{"id":15420741,"url":"https://github.com/larryclaman/docker-detect-secrets","last_synced_at":"2026-01-02T21:09:05.674Z","repository":{"id":116641864,"uuid":"321779499","full_name":"larryclaman/docker-detect-secrets","owner":"larryclaman","description":null,"archived":false,"fork":false,"pushed_at":"2020-12-15T21:15:39.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T22:08:47.708Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/larryclaman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"security.txt","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-15T20:19:08.000Z","updated_at":"2020-12-15T21:15:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"255a246a-f6cb-4bf8-9545-139ecec51c26","html_url":"https://github.com/larryclaman/docker-detect-secrets","commit_stats":{"total_commits":10,"total_committers":2,"mean_commits":5.0,"dds":0.4,"last_synced_commit":"6cb4483f90e86c011b31cdd4ac98d05abf8062ac"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larryclaman%2Fdocker-detect-secrets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larryclaman%2Fdocker-detect-secrets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larryclaman%2Fdocker-detect-secrets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larryclaman%2Fdocker-detect-secrets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/larryclaman","download_url":"https://codeload.github.com/larryclaman/docker-detect-secrets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243695537,"owners_count":20332626,"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","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-01T17:30:13.427Z","updated_at":"2026-01-02T21:09:05.585Z","avatar_url":"https://github.com/larryclaman.png","language":"Dockerfile","readme":"# About\n\n_Forked from  https://github.com/lirantal/docker-detect-secrets_\n\nA docker image to enable invoking of Yelp's [detect-secrets](https://github.com/Yelp/detect-secrets) hook command without having to install the python package.\nFind it at: https://github.com/users/larryclaman/packages/container/package/dockerdetectsecrets\n\n# Usage\n\n## Detecting secrets in a project\n\nRuns the `detect-secrets-hook` command for a given git project, with the following options:\n\n- The current directory is assumed to be the .git root directory and so the volume mounts `pwd` to the container's `/usr/src/app` directory\n- `src/index.js` and `src/component.js` are files for which will be tested for secrets\n\n```bash\ndocker run -it --rm --name detect-secrets --volume `pwd`:/usr/src/app lirantal/detect-secrets \"src/index.js\" \"src/component.js\"\n```\n\n## Detecting secrets in a project that has a baseline\n\nIf a project has a previously created `.secrets-baseline` it can be passed as a command argument to the container:\n\n```bash\ndocker run -it --rm --name detect-secrets --volume `pwd`:/usr/src/app lirantal/detect-secrets \"--baseline .secrets-baseline\" \"src/index.js\"\n```\n\n## Detecting secrets in a monorepo style project\n\nFor projects which exhibit a structure such as:\n\n```\n| app\n  |_ .git/\n  |_ client/\n  |_ server/\n       |_ .secrets-baseline\n```\n\nit is required to tweak the execution of `detect-secrets-hook` when it runs in the container image to simulate the exact scenario of it running inside the nested `server/` directory, while mounting the top level application directory:\n\n```bash\ndocker run -it --rm --name detect-secrets --volume /path/to/root/project/dir:/usr/src/app --workdir \"/usr/src/app/server\" lirantal/detect-secrets \"src/index.js\"\n```\n\n# Developing\n\nBuilding the image from the Dockerfile and then you may execute it locally:\n\n```bash\ndocker build --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') --tag detect-secrets .\n```\n\n# Author\n\nLiran Tal \u003cliran@snyk.io\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarryclaman%2Fdocker-detect-secrets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flarryclaman%2Fdocker-detect-secrets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarryclaman%2Fdocker-detect-secrets/lists"}