{"id":15601156,"url":"https://github.com/hacknlove/autarchy","last_synced_at":"2026-06-04T23:31:20.003Z","repository":{"id":47830973,"uuid":"394642663","full_name":"hacknlove/autarchy","owner":"hacknlove","description":"proxied/saved/mocked environment to test and develop microservices","archived":false,"fork":false,"pushed_at":"2021-09-03T15:29:45.000Z","size":747,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-19T23:22:24.161Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hacknlove.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-10T12:19:16.000Z","updated_at":"2024-04-25T02:41:10.000Z","dependencies_parsed_at":"2022-08-28T11:11:29.703Z","dependency_job_id":null,"html_url":"https://github.com/hacknlove/autarchy","commit_stats":null,"previous_names":["hacknlove/autharchy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hacknlove/autarchy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fautarchy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fautarchy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fautarchy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fautarchy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hacknlove","download_url":"https://codeload.github.com/hacknlove/autarchy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fautarchy/sbom","scorecard":{"id":452287,"data":{"date":"2025-08-11","repo":{"name":"github.com/hacknlove/autarchy","commit":"4c53f7fca219a9b502671e5268e7efe945070052"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.3,"checks":[{"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":"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":"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":"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":"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":"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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"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"}},{"name":"Vulnerabilities","score":0,"reason":"29 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-7gc6-qh9x-w6h8","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-vxvm-qww3-2fh7","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T08:30:57.799Z","repository_id":47830973,"created_at":"2025-08-19T08:30:57.799Z","updated_at":"2025-08-19T08:30:57.799Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33924832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-10-03T02:18:51.137Z","updated_at":"2026-06-04T23:31:19.986Z","avatar_url":"https://github.com/hacknlove.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# autarchy\n\nproxied/saved/mocked environment to test and develop microservices \n\n## Install\n\nYou can install it globally\n```\nnpm -g autarchy\n```\n\nor as a dependency\n```\nnpm -D autarchy\n```\n\n## Companions\n\n### [webapp](https://github.com/hacknlove/autarchy-webapp)\nBrowse the recent requests \n\n### [server](https://github.com/hacknlove/autarchy-server)\nAllow other to access your local services \n## Configuration\n\n```\nmkdir .autarchy\n\ncd .autarchy\n\necho module.exports = {} \u003e config.js\n```\n\n### Main config\nThe file `.autarchy/config.js` will eventually allow to set default configuration for all the services. Currently it's not used.\n### Service\n\nCreate a folder for each service, with a `config.js` inside\n\n#### Example\n\n`.autarchy/foo/config.js`\n```js\nmodule.exports = {\n  type: 'REST',\n  remote: 'https://example.com/api',\n  local: {\n    ip: '127.0.0.1',\n    port: 5000,\n  }\n}\n```\n#### type (required)\nThe type of the service. The provided types are REST and graphql\n\nCustom types can be added.\n\n#### name\nIt defaults to the folder name.\n\nIt's used to determine the collection's name `${type}-${name}`\n\nIn the example the `name` is `'foo'` and the collection name is `'REST-foo'` \n\n#### remote\nThe url of the service that you want to proxy\n\nIt is not required if you are mocking all the endpoints from the database or a `pre` or `post` function. \n\n#### local\nWhere to bind the local service.\n* `local.ip` defaults to `'0.0.0.0`\n* `local.port` defaults to `80` \n\n#### pre\n`(context) =\u003e context`\n\nit's executed just after matching the endpoint.\n\nIt can be used to modify the request that will be used to search on the database or to be sent to the proxy\n\nIt also can set a response, or modify the configuration.\n\nPlease refer to the service type documentation to further instructions regarding the context and the response\n\n#### toQuery\n`[(context) =\u003e ({ some mongo query }), ...]` | `false`\n\nRequests are cached so after a first fetch you don't need the remote service to be up and running.\n\nYou can use `pre` to set `context.conf.toQuery` to false to disable the cache search\n\nOtherwise it will loop the array running query after query until it returns a response.\n\nPlease refer to the service type documentation to further instructions regarding the defaults and the context schema regarding the request.\n\n#### toDocument\n`(context) =\u003e document`\n\nYou can use `pre` to set `context.conf.toDocument` to false to skip inserting the request and response in the database\n\nPlease refer to the service type documentation to further instructions regarding the defaults and the context schema regarding the request.\n\n#### post\n`(context) =\u003e context`\n\nit's executed just before sending the response.\n\nIt can be used to modify the response that will be sent\n\nPlease refer to the service type documentation to further instructions regarding the context and the response\n\n#### skipLogs\n\nRequests are also logged, you can disable that setting `skipLogs` thuthy.\n\n### REST\n\n#### Endpoints\n\nIf you want an specific configuration for a endpoint, you need to create a file whose name is the http method (or `all`), and the file path is the `endpoint/` + the endpoint path\n\nFor instance: This file `.autarchy/foo/endpoints/some/endpoint/GET.js` will override `.autarchy/foo/config.js` when the request is a `GET` to `/some/endpoint` \n\nYou can use parameters between brackets.\n\nFor instance this file `.autarchy/foo/endpoints/some/endpoint/[id]/all.js` will override `.autarchy/foo/config.js` when a `POST` is sent to `/some/endpoint/bar` or when a `GET` is sent to `/some/endpoint/buz`\n\n\n#### context\n\n```json\n{\n  \"request\": {\n    \"path\": \"\",\n    \"params\": {},\n    \"headers\": {},\n    \"method\": \"\",\n    \"body\": {},\n    \"query\": {}\n  },\n  \"conf\": {\n    // ...foo/config.js,\n    // ...foo/endoints/path/METHOD.js \n  },\n  \"response\": {\n    \"status\": 200,\n    \"headers\": {},\n    \"body\": {}\n  }\n}\n```\n\n### graphql\n\n#### Queries\n\nIf you want to override `.autarchy/foo/config.js` in some queries you can create any file at any path inside `.autarchy/foo/queries/`\n\nFor instance\n\n`.autarchy/foo/queries/bar.js`\n```js\nmodule.exports = {\n  match: (context) =\u003e true // false \n}\n```\n\nIt will loop over the files under `queries/` until some `match` returns `truthy`\n\nFirst one that matches, will override the configuration\n\n#### context\n```json\n{\n  \"request\": {\n    \"headers\": {},\n    \"method\": \"\",\n    \"body\": {},\n    \"query\": {}\n  },\n  \"conf\": {\n    // ...foo/config.js,\n    // ...foo/queries/baz.js \n  },\n  \"response\": {\n    // the graphql response\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhacknlove%2Fautarchy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhacknlove%2Fautarchy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhacknlove%2Fautarchy/lists"}