{"id":37108053,"url":"https://github.com/intercloud/silk","last_synced_at":"2026-01-14T12:58:29.444Z","repository":{"id":57583479,"uuid":"147937880","full_name":"intercloud/silk","owner":"intercloud","description":"Markdown based document-driven RESTful API testing.","archived":false,"fork":true,"pushed_at":"2018-02-28T11:16:54.000Z","size":907,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T15:00:11.263Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://silktest.org/","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"matryer/silk","license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intercloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-08T13:56:02.000Z","updated_at":"2018-09-08T13:56:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/intercloud/silk","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/intercloud/silk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intercloud%2Fsilk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intercloud%2Fsilk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intercloud%2Fsilk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intercloud%2Fsilk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intercloud","download_url":"https://codeload.github.com/intercloud/silk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intercloud%2Fsilk/sbom","scorecard":{"id":491254,"data":{"date":"2025-08-11","repo":{"name":"github.com/intercloud/silk","commit":"11c4f5465bf617bd7ff879e7e243c9180ca35528"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-19T19:13:15.646Z","repository_id":57583479,"created_at":"2025-08-19T19:13:15.646Z","updated_at":"2025-08-19T19:13:15.646Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28420815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T12:58:28.797Z","updated_at":"2026-01-14T12:58:29.437Z","avatar_url":"https://github.com/intercloud.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Silk logo](https://github.com/matryer/silk/blob/master/other/SilkLogo-256.png)\n\n# silk [![Build Status](https://travis-ci.org/matryer/silk.svg?branch=master)](https://travis-ci.org/matryer/silk) [![Go Report Card](https://goreportcard.com/badge/github.com/matryer/silk)](https://goreportcard.com/report/github.com/matryer/silk)\n\nMarkdown based document-driven web API testing.\n\n* Write nice looking Markdown documentation ([like this](https://github.com/matryer/silk/blob/master/testfiles/success/example.silk.md)), and then run it using the [silk command](#command-line)\n* Simple and robust [Markdown API](#markdown-api)\n* Comes with [real examples](https://github.com/matryer/silk/tree/master/testfiles/success) that you can copy (that are also part of the test suite for the project)\n* 10% discount on [LightPaper markdown editor app](http://lightpaper.42squares.in) for Silk users: use `SILKTEST` code.\n\n## Learn more\n\n[![Video of Mat Ryer speaking about Silk](https://github.com/matryer/silk/blob/master/other/video-preview.jpg)](https://skillsmatter.com/skillscasts/7636-go-release#video)\n\n[(VIDEO) Watch the talk about Silk](https://skillsmatter.com/skillscasts/7636-go-release#video) (with [slides](http://go-talks.appspot.com/github.com/matryer/silk/other/presentation/silk.slide#1)) or [read about Silk in this blog post](https://medium.com/@matryer/introducing-silk-markdown-driven-api-tests-1f8cfb0ef99a#.kzpanz1xc).\n\n![Example Silk test file](https://github.com/matryer/silk/blob/master/other/example.png)\n\n## Markdown API\n\nTests are made up of documents written in Markdown.\n\n* `# Group` - Top level headings represent groups of requests\n* `## GET /path` -  Second level headings represent a request\n* Code blocks with three back tics represent bodies\n* `* Field: value` - Lists describe headers and assertions\n* `* ?param=value` - Request parameters\n* `---` seperators break requests from responses\n* Comments (starting with `//`) allow you to capture variables\n* Plain text is ignored to allow you to add documentation\n* Inline back tics are ignored and are available for formatting\n\n### Document structure\n\nA document is made up of:\n\n* A request\n* `---` seperator\n* Assertions\n\n### Requests\n\nA request starts with `##` and must have an HTTP method, and a path:\n\n```\n## METHOD /path\n```\n\nExamples include:\n\n```\n## GET /people\n\n## POST /people/1/comments\n\n## DELETE /people/1/comments/2\n\n```\n\n#### Request body (optional)\n\nTo specify a request body (for example for `POST` requests) use a codeblock using backtics (` ``` `):\n\n    ```\n    {\"name\": \"Silk\", \"release_year\": 2016}\n    ```\n\n#### Request headers (optional)\n\nYou may specify request headers using lists (prefixed with `*`):\n\n```\n* Content-Type: \"application/json\"\n* X-Custom-Header: \"123\"\n```\n\n#### Request parameters (optional)\n\nAdding parameters to the path (like `GET /path?q=something`) can be tricky, especially when you consider escaping etc. To address this, Silk supports parameters like lists:\n\n```\n* ?param=value\n```\n\nThe parameters will be correctly added to the URL path before the request is made.\n\n#### Cookies\n\nSetting cookies on a request can be done using the [HTTP header](https://en.wikipedia.org/wiki/HTTP_cookie#Implementation) pattern:\n\n```\n* Cookie: \"key=value\"\n```\n\n* See [asserting cookies](#asserting-cookies).\n\n### Assertions\n\nFollowing the `---` separator, you can specify assertions about the response. At a minimum, it is recommended that you assert the status code to ensure the request succeeded:\n\n```\n* Status: 200\n```\n\nYou may also specify response headers in the same format as request headers:\n\n```\n* Content-Type: \"application/json\"\n* X-MyServer-Version: \"v1.0\"\n```\n\nIf any of the headers do not match, the test will fail.\n\n#### Capturing data\n\nSilk allows you to capture values at the point of asserting them and reuse them in future requests and assertions. To capture a value, include a comment on the line that mentions a `{placeholder}`:\n\n```\n* Data.UserID: /.*/ // The user's unique {id}.\n```\n\nThe value from `UserID` (e.g. `123`) will be stored in a variable called `id`, and you can refer to it later:\n\n```\n## GET /users/{id}\n```\n\nThe above would be a request to `GET /users/123`.\n\n  * Captured values are only available when assertions are successful\n\n#### Environment variables\n\nYou can access environment variables inside Silk tests using the `{$NAME}` format, where `NAME` is the environment name.\n\n#### Asserting cookies\n\nTo assert that a cookie is present in a response, make a regex assertion against the `Set-Cookie` HTTP header:\n\n```\n* Set-Cookie: /key=value/\n```\n\n* All cookie strings are present in a single `Set-Cookie` seperated by a pipe character.\n\n#### Validating data\n\nYou can optionally include a verbatim body using code blocks surrounded by three back tics. If the response body does not exactly match, the test will fail:\n\n    ```\n    Hello world!\n    ```\n\nYou can flag expected response bodies as `json` directly after the three back tics.\nThis will assert that the actual response contains the same value for each expected key (recursively)\nallowing for differences in whitespace and ordering as well as being lenient towards additional (unexpected) keys in the response.\n\n    ```json\n    {\n        \"id\": 1,\n        \"release_year\": 2016,\n        \"name\": \"Silk\"\n    }\n    ```\n\nYou can use the flag `json(strict)` to enforce that no additional fields may be present while still allowing for differences in whitespace and key order.\n\nYou may also make any number of regex assertions against the body using the `Body` object:\n\n```\n* Body: /Hello world/\n* Body: /This should be found too/\n* Body: /and this/\n```\n\nAlternatively, you can specify a list (using `*`) of data fields to assert accessible via the `Data` object:\n\n```\n* Status: 201\n* Content-Type: \"application/json\"\n* Data.name: \"Silk\"\n* Data.release_year: 2016\n* Data.tags[0]: \"testing\"\n* Data.tags[1]: \"markdown\"\n* Data[0].name: \"Mat\"\n* Data[1].name: \"David\"\n```\n\n* NOTE: Currenly this feature is only supported for JSON APIs.\n\n#### Regex\n\nValues may be regex, if they begin and end with a forward slash: `/`. The assertion will pass if the value (after being turned into a string) matches the regex.\n\n```\n* Status: /^2.{2}$/\n* Content-Type: /application/json/\n```\n\nThe above will assert that:\n\n* The status looks like `2xx`, and\n* The `Content-Type` contains `application/json`\n\n## Command line\n\nThe `silk` command runs tests against an HTTP endpoint.\n\nUsage:\n\n```\nsilk -silk.url=\"{endpoint}\" {testfiles...}\n```\n\n* `{endpoint}` the endpoint URL (e.g. `http://localhost:8080`)\n* `{testfiles}` list of test files (e.g. `./testfiles/one.silk.md ./testfiles/two.silk.md`)\n\nNotes:\n\n* Omit trailing slash from `endpoint`\n* `{testfiles}` can include a pattern (e.g. `/path/*.silk.md`) as this is expended by most terminals to a list of matching files\n\n## Golang\n\nSilk is written in Go and integrates seamlessly into existing testing tools and frameworks. Import the `runner` package and use `RunGlob` to match many test files:\n\n```\npackage project_test\n\nimport (\n  \"testing\"\n  \"github.com/matryer/silk/runner\"\n)\n\nfunc TestAPIEndpoint(t *testing.T) {\n  // start a server\n  s := httptest.NewServer(yourHandler)\n  defer s.Close()\n\n  // run all test files\n  runner.New(t, s.URL).RunGlob(filepath.Glob(\"../testfiles/failure/*.silk.md\"))\n}\n```\n\n* See the [documentation for the silk/runner package](https://godoc.org/github.com/matryer/silk/runner)\n\n## Credit\n\n* Special thanks to [@dahernan](https://github.com/dahernan) for his contributions and criticisms of Silk\n* Silk logo by [Chris Ryer](http://chrisryer.co.uk)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintercloud%2Fsilk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintercloud%2Fsilk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintercloud%2Fsilk/lists"}