{"id":50565390,"url":"https://github.com/valango/security","last_synced_at":"2026-06-04T14:01:23.986Z","repository":{"id":355226409,"uuid":"1227283147","full_name":"valango/security","owner":"valango","description":"Some basic rules of survival for developers","archived":false,"fork":false,"pushed_at":"2026-05-02T13:43:43.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-02T15:27:27.913Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/valango.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-02T13:18:50.000Z","updated_at":"2026-05-02T13:43:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/valango/security","commit_stats":null,"previous_names":["valango/security"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/valango/security","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valango%2Fsecurity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valango%2Fsecurity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valango%2Fsecurity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valango%2Fsecurity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valango","download_url":"https://codeload.github.com/valango/security/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valango%2Fsecurity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33907694,"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":"2026-06-04T14:01:23.006Z","updated_at":"2026-06-04T14:01:23.979Z","avatar_url":"https://github.com/valango.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Security Rules for Software Development\n\n_The rules are not exhaustive and apply to javascript/typescript technologies in the first place.\nBe aware that other ecosystems (Python, GoLang, ...) are under attack as well._\n\nNOTE: for better readability the more in-depth [comments](#comments) are in the end of the document.\n\n## Rules and Requirements\n\n### Using Package Managers\n\nUse only `npm` or `pnpm`. If you need anything else, consult the IT guys first!\n\nKeep your package managers up to date, but don't install updates which are less than 3 days old.\n\nRegularly run _**audit** command_ on your active repositories.\n\n1. Never delete an existing `package-lock.json` or `pnpm-lock.yaml` file. This file ensures that the exact same versions\n   of\n   dependencies are installed when you re-install your project.\n2. Prevent package auto-run: run\n   ```sh\n   $ npm config set -g ignore-scripts true # or \n   $ pnpm config set ignore-scripts true\n   ```\n2. Make sure there is a .npmrc or .pnpmrc file in your project directory and it contains a line:\u003cbr\u003e\n   `ignore-scripts=true`\n   The pnpm provides additional quite flexible configuration options, see https://pnpm.io/settings#onlybuiltdependencies\n3. Always check that none of package or configuration files contain any access keys, URLs etc., unless these are really\n   irrelevant.\n4. _**Do not** install_ the _default version of any package_. Always use a specific version.\n   Check the package's release history and security advisories.\n   The same rules apply to updating your project dependencies, too.\n   Infected uploads are usually detected in about a week or so.\n   Instead of `npm install something` use `npm install something@1.2.3`.\n5. Always use `npm ci` and NOT `npm install` when re-installing dependencies of a project.\u003cbr\u003eWith `pnpn` use\n   `pnpm install --frozen-lockfile`\n6. Do not use `npm audit fix` or `pnpn audit --fix`, because the latest versions might be installed w/o checking.\n\n### Preventing AI Tools from Stealing or Compromising Your Data\n\nThe https://claude.ai claims that _Claude.app_ / _Claude.exe_ is \"safe\", but this might not be true.\nHereby we speak of command line tools - the things you can run from the terminal window command line.\n\n#### MacOS: Run Claude Code in a Docker Container\nI followed https://github.com/trailofbits/claude-code-devcontainer/tree/main w/o installing OrbStack or Colima.\nTried the \"Pattern A\" -\u003e Terminal. Installation was quite lengthy, but it worked. Need to check the \"Pattern B\".\n\n_This looks promising_: https://docs.docker.com/ai/sandboxes/ , but it requires at least **MacOS.26 Tahoe**.\n\n#### MacOS: Create a Special User Account\nLog into it (or `su -` into it) when running Claude Code. That user has\nits own home directory, its own (empty) Keychain, no access to your real `~/.ssh/`, no AWS credentials. Project files\nlive in a directory you've chmod'd to be readable by both users, or you symlink/bind-mount them in.\n\u003cbr\u003e_**EDIT@0503**: all that is not that simple as it seems and is not proved yet._\n\n#### Windows: Use Docker Sandbox:\nThis could work: https://docs.docker.com/ai/sandboxes (not tested yet).\n\nRunning tools in VM could be a solution too. \n\n## Comments\n\n**Q**: Is it secure to run any software in a Web Browser window?\u003cbr\u003e\n**A**: No. Malware and infected web sites have always been there.\u003cbr\u003e\nPeople think local files can't be read by a web browser, but they can.\nRunning AI web apps in a browser is just _moderately safer_ than running installed versions.\n\n### Using package managers\n\nThere are some prominent attack vectors known:\n\n1. an infected 3-rd party package may contain a script in its package.json file that will run automatically during\n   installation. A malware may harvest all passwords, API keys, access tokens from your system, send them to somebody\n   and/or try to exploit those immediately.\n2. The code itself may be infected as well. In this case, the malware activates when the package or your code using it,\n   is executed.\n3. If you are a developer owning any packages in public repos like npmjs.com, a malware may publish new infected\n   releases of your existing packages. Usually only the release number will differ and in some cases the same release\n   can be replaced.\n   \n**Q**: Why do I need play with .pnpmrc file if I already set the global options?\u003cbr\u003e\n**A**: When deploying your stuff to hosting, your global settings will not follow. Those are only your local safeguards.\n\n### Preventing AI Tools from Stealing or Compromising Your Data\n\n_Any software installed on your system **can steal or compromise your data**.\nIf this is not bad enough, then so can do any browser plugin/add-on, too._\n\nThe main known attack vectors are:\n1. A tool in use gets auto-updated to a new version that contains a malicious code (unlikely).\n2. A _command insertion_ type attack to a model / agent you are using.\n3. A spyware installed or prepared for during installation of a tool.\u003cbr\u003e\n   Example: https://www.thatprivacyguy.com/blog/anthropic-spyware 😨\n\n## References\n\n* https://pnpm.io/supply-chain-security\n* https://developer.chrome.com/docs/capabilities/web-apis/file-system-access\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalango%2Fsecurity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalango%2Fsecurity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalango%2Fsecurity/lists"}