{"id":13743144,"url":"https://github.com/mbalabash/sdc-check","last_synced_at":"2026-03-16T16:39:16.597Z","repository":{"id":57689076,"uuid":"474093631","full_name":"mbalabash/sdc-check","owner":"mbalabash","description":"Small tool to inform you about potential risks in project dependencies list","archived":false,"fork":false,"pushed_at":"2023-11-21T14:43:36.000Z","size":412,"stargazers_count":143,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T11:12:31.635Z","etag":null,"topics":["audit","npm","security","supply-chain-security"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbalabash.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-03-25T16:54:09.000Z","updated_at":"2025-07-16T23:23:23.000Z","dependencies_parsed_at":"2023-11-21T15:51:47.033Z","dependency_job_id":null,"html_url":"https://github.com/mbalabash/sdc-check","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"c88958963e8193c7554f599bab9fc5337f6813a1"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mbalabash/sdc-check","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbalabash%2Fsdc-check","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbalabash%2Fsdc-check/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbalabash%2Fsdc-check/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbalabash%2Fsdc-check/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbalabash","download_url":"https://codeload.github.com/mbalabash/sdc-check/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbalabash%2Fsdc-check/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005468,"owners_count":26083900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"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":["audit","npm","security","supply-chain-security"],"created_at":"2024-08-03T05:00:41.347Z","updated_at":"2025-10-10T22:17:34.563Z","avatar_url":"https://github.com/mbalabash.png","language":"TypeScript","funding_links":[],"categories":["Static Code Analysis","TypeScript"],"sub_categories":[],"readme":"# sdc-check\n\nSmall tool to inform you about potential risks in your project dependencies list:\n\n- **Lock file is not safe** (`lockfile-is-not-safe`). During the development process a malicious actor could replace URLs in a lock file to package with malicious code (it is especially dangerous because it is hard to catch in PR review)\n\n- **The newest package version is too new** (`package-is-too-new`). A new version of a package could be vulnerable. It might be safer to wait X days before upgrading to the new version and let community test it\n\n- **Installation Script** (`install-scripts`). An attacker can use installation scripts to run commands that perform malicious acts through the package installation step\n\n- **Obfuscated code** (`obfuscated-code`). A package contains obfuscated code which may point to attempt of hiding potentially malicious code\n\n- **A package has OS scripts** (`has-os-scripts`). An attacker can use .bat/.sh scripts to execute malicious actions (downloading and launching mining apps, etc)\n\n- **A package script has shell commands** (`dangerous-shell-commands`). Package script could have potentially dangerous commands to perform malicious actions (curl, wget, chmod, cacls, etc)\n\n- **The newest package version is released after a long period of inactivity** (`released-after-long-period-of-inactivity`). There is a possibility that an attacker could hijack an account and publish malicious code\n\n- **Unmaintained Package** (`unmaintained-package`). A package has no updates for at least one year\n\n- **Too many decision makers** (`too-many-decision-makers`). A package with too many maintainers/publishers will provide an attacker many targets to exploit account takeover and social engineering attacks\n\n- **No source code repository** (`no-source-code`). When a package has no source code repository/homepage the access to review source code is restricted, forcing users to trust a package blindly\n\n## Usage\n\n### Add to your project\n\nAdd new npm command to script section in your `package.json`\n\n```json\n\"scripts\": {\n  \"sdc-check\": \"sdc-check -d .\",\n}\n```\n\n### Use in your CI pipeline\n\nAdd new step to your pipeline\n\n```yaml\n# Github Actions example:\n- name: Check dependencies with sdc-check\nrun: yarn sdc-check\n```\n\n### Configure\n\nAdd new `\"sdc-check\"` section in your `package.json` to change defaults\n\n- **options** define metrics behaviour\n- **errors** define set of metrics when audit should fail if those metrics won't pass\n\n```json\n\"sdc-check\": {\n  \"options\": {\n    \"limitOfDecisionMakers\": 7,\n    \"daysBeforeUpgradeToNewVersion\": 5,\n    \"monthsOfInactivityAllowed\": 10\n  },\n  \"errors\": [\n    \"package-is-too-new\",\n    \"lockfile-is-not-safe\",\n    \"has-os-scripts\",\n    \"dangerous-shell-commands\"\n  ]\n}\n```\n\n### Ignore errors (do it wisely)\n\nAdd `.sdccheckignore` to your project root directory\n\n```yaml\n# Ignore errors caused by unmaintained-package metric for sdc-check@1.0.0\nsdc-check@1.0.0 | unmaintained-package\n\n# Ignore all errors for sdc-check@1.0.0\nsdc-check@1.0.0\n\n# Ignore errors caused by unmaintained-package and\n# released-after-long-period-of-inactivity metrics for sdc-check\nsdc-check | unmaintained-package, released-after-long-period-of-inactivity\n\n# Ignore all errors for sdc-check\nsdc-check\n```\n\n### Check npm package\n\nFind out more about a package before adding it to your dependencies list\n\n```sh\nnpx sdc-check -p ua-parser-js -v 1.0.2\n```\n\n### Wandering what has changed in the newest version of some package?\n\nUse `npm diff` command to find out\n\n```sh\nnpm diff --diff=dependency@1.2.3 --diff=dependency@1.3.5\n```\n\n## Common threats in supply chain security\n\n1. **Malicious code injection**: During the development process an attacker could add malicious code to a package codebase (it is dangerous because it may be hard to catch in PR review).\n\n2. **Malicious package release**: An attacker may publish malicious packages and hence trick other users into installing or depending on such packages.\n\n3. **Social Engineering**: An attacker may manipulate a maintainer to hand over sensitive information.\n\n4. **Account Takeover**: An attacker may compromise the credentials of a maintainer to inject malicious code under the maintainer’s name.\n\n5. **Ownership transfer**: An attacker can show enthusiasm to maintain popular abandoned packages and transfer the ownership of a package.\n\n6. **Remote execution**: An attacker may target a package by compromising the third-party services used by that package.\n\n## Install\n\n```js\nnpm i -D sdc-check\n```\n\nor\n\n```js\nyarn add -D sdc-check\n```\n\n## Acknowledgments\n\n- [What are Weak Links in the npm Supply Chain?](https://arxiv.org/abs/2112.10165v2)\n- [NodeSecure](https://github.com/NodeSecure)\n- [Security for package maintainers](https://sethmlarson.dev/blog/security-for-package-maintainers)\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbalabash%2Fsdc-check","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbalabash%2Fsdc-check","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbalabash%2Fsdc-check/lists"}