{"id":13416493,"url":"https://github.com/replicatedhq/dockerfilelint","last_synced_at":"2026-10-19T17:31:24.346Z","repository":{"id":3885858,"uuid":"51224237","full_name":"replicatedhq/dockerfilelint","owner":"replicatedhq","description":"An opinionated Dockerfile linter.","archived":false,"fork":false,"pushed_at":"2023-09-27T20:58:01.000Z","size":420,"stargazers_count":1035,"open_issues_count":55,"forks_count":82,"subscribers_count":19,"default_branch":"main","last_synced_at":"2026-10-17T17:16:09.974Z","etag":null,"topics":["dockerfile","linter"],"latest_commit_sha":null,"homepage":"https://www.fromlatest.io","language":"JavaScript","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/replicatedhq.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,"dei":null}},"created_at":"2016-02-06T22:02:43.000Z","updated_at":"2026-10-15T05:18:03.000Z","dependencies_parsed_at":"2024-02-04T10:04:39.157Z","dependency_job_id":"411ba449-f09a-4555-b591-06eab71b41eb","html_url":"https://github.com/replicatedhq/dockerfilelint","commit_stats":{"total_commits":91,"total_committers":22,"mean_commits":4.136363636363637,"dds":0.6373626373626373,"last_synced_commit":"f7bdc892c28763cae835bc69ada55d20f65ed61e"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/replicatedhq/dockerfilelint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicatedhq%2Fdockerfilelint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicatedhq%2Fdockerfilelint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicatedhq%2Fdockerfilelint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicatedhq%2Fdockerfilelint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/replicatedhq","download_url":"https://codeload.github.com/replicatedhq/dockerfilelint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicatedhq%2Fdockerfilelint/sbom","scorecard":{"id":771358,"data":{"date":"2025-08-11","repo":{"name":"github.com/replicatedhq/dockerfilelint","commit":"f7bdc892c28763cae835bc69ada55d20f65ed61e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"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":"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":"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":"Pinned-Dependencies","score":-1,"reason":"internal error: internal error: invalid Dockerfile: Syntax error - can't find = in \"value\". Must be of the form: name=value","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":"Code-Review","score":5,"reason":"Found 7/14 approved changesets -- score normalized to 5","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":"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":"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":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: 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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 25 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"34 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-2j2x-2gpw-g8fm","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-2m39-62fm-q8r3","Warn: Project is vulnerable to: GHSA-7xcx-6wjh-7xp2","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"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-23T02:21:26.295Z","repository_id":3885858,"created_at":"2025-08-23T02:21:26.295Z","updated_at":"2025-08-23T02:21:26.295Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38335277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-17T02:00:06.547Z","response_time":57,"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":["dockerfile","linter"],"created_at":"2024-07-30T21:00:59.671Z","updated_at":"2026-10-19T17:31:23.666Z","avatar_url":"https://github.com/replicatedhq.png","language":"JavaScript","funding_links":[],"categories":["Docker Images","JavaScript","Linters","Infrastructure \u0026 DevOps"],"sub_categories":["Linter","Dockerfile"],"readme":"# Linter and validator for Dockerfile\n\n[![Coverage Status](https://coveralls.io/repos/github/replicatedhq/dockerfilelint/badge.svg?branch=master)](https://coveralls.io/github/replicatedhq/dockerfilelint?branch=master)\n[![Build Status](https://travis-ci.org/replicatedhq/dockerfilelint.svg?branch=master)](https://travis-ci.org/replicatedhq/dockerfilelint)\n\n`dockerfilelint` is an node module that analyzes a Dockerfile and looks for common traps, mistakes and helps enforce best practices.\n\n## Installation\n\nGlobal installation with npm package manager.\n\n```shell\nnpm install -g dockerfilelint\n```\n\n## Testing\nStart unit tests with `npm test`, `yarn run test`, or `docker-compose -f docker-compose.test.yml up`\n\n## Running\n\n#### From the command line:\n\n```shell\n./bin/dockerfilelint \u003cpath/to/Dockerfile\u003e\n```\n\n#### Command Line options\n\n```shell\nUsage: dockerfilelint [files | content..] [options]\n\nOptions:\n  -o, --output   Specify the format to use for output of linting results. Valid values\n                 are `json` or `cli` (default).                               [string]\n  -j, --json     Output linting results as JSON, equivalent to `-o json`.    [boolean]\n  -v, --version  Show version number                                         [boolean]\n  -h, --help     Show help                                                   [boolean]\n\nExamples:\n  dockerfilelint Dockerfile         Lint a Dockerfile in the current working\n                                    directory\n\n  dockerfilelint test/example/* -j  Lint all files in the test/example directory and\n                                    output results in JSON\n\n  dockerfilelint 'FROM latest'      Lint the contents given as a string on the\n                                    command line\n\n  dockerfilelint \u003c Dockerfile       Lint the contents of Dockerfile via stdin\n```\n\n#### Configuring\n\nYou can configure the linter by creating a `.dockerfilelintrc` with the following syntax:\n```yaml\nrules:\n  uppercase_commands: off\n```\n\nThe keys for the rules can be any file in the /lib/reference.js file.  At this time, it's only possible to disable rules.  They are all enabled by default.\n\nThe following rules are supported:\n```\nrequired_params\nuppercase_commands\nfrom_first\ninvalid_line\nsudo_usage\napt-get_missing_param\napt-get_recommends\napt-get-upgrade\napt-get-dist-upgrade\napt-get-update_require_install\napkadd-missing_nocache_or_updaterm\napkadd-missing-virtual\ninvalid_port\ninvalid_command\nexpose_host_port\nlabel_invalid\nmissing_tag\nlatest_tag\nextra_args\nmissing_args\nadd_src_invalid\nadd_dest_invalid\ninvalid_workdir\ninvalid_format\napt-get_missing_rm\ndeprecated_in_1.13\n```\n\n#### From a Docker container\n\n(Replace the ``pwd``/Dockerfile with the path to your local Dockerfile)\n```shell\ndocker run -v `pwd`/Dockerfile:/Dockerfile replicated/dockerfilelint /Dockerfile\n```\n\n#### Online\n\nIf you don't want to install this locally you can try it out on  [https://fromlatest.io](https://www.fromlatest.io/#/).\n\n## Checks performed\n\n### `FROM`\n\n- [x] This should be the first command in the Dockerfile\n- [x] Base image should specify a tag\n- [x] Base image should not use latest tag\n- [x] Support `FROM scratch` without a tag\n- [x] Support the `FROM \u003cimage\u003e@\u003cdigest\u003e` syntax\n- [ ] Allow config to specify \"allowed\" base layers\n\n### `MAINTAINER`\n\n- [x] Should be followed by exactly 1 parameter (@ sign)\n\n### `RUN`\n\n- [x] sudo is not included in the command\n- [x] apt-get [install | upgrade | remove] should include a -y flag\n- [x] apt-get install commands should include a `--no-install-recommends` flag\n- [x] apt-get install commands should be paired with a `rm -rf /var/lib/apt/lists/*` in the same layer\n- [x] Avoid running `apt-get upgrade` or `apt-get dist-upgrade`\n- [x] Never run `apt-get update` without `apt-get install` on the same line\n- [x] apk add commands should include a `--no-cache` flag or be paired with an `--update` flag with `rm -rf /var/cache/apk/*` in the same layer\n- [x] apk add support for --virtual flag\n- [ ] handle best practices for yum operations and cleanup\n\n### `CMD`\n\n- [x] Only a single `CMD` layer is allowed\n- [ ] Better handling of escaped quotes\n- [ ] Detect exec format with expected variable substitution\n\n### `LABEL`\n\n- [x] Format should be key=value\n\n### `EXPOSE`\n\n- [x] Only the container port should be listed\n- [ ] All ports should be exposed in a single cache layer (line)\n- [ ] The same port number should not be exposed multiple times\n- [x] Exposed ports should be numeric and in the accepted range\n\n### `ENV`\n\n- [x] Format of `ENV`\n- [ ] Best practice of only using a single `ENV` line to reduce cache layer count\n\n### `ADD`\n\n- [x] Command should have at least 2 parameters\n- [x] Source command(s) cannot be absolute or relative paths that exist outside of the current build context\n- [x] Commands with wildcards or multiple sources require that destination is a directory, not a file\n- [ ] If an `ADD` command could be a `COPY`, then `COPY` is preferred\n- [ ] Using `ADD` to fetch remote files is discouraged because they cannot be removed from the layer\n\n### `COPY`\n\n- [ ] Implement checking (similar to ADD)\n- [ ] Do not `COPY` multiple files on a single command to best use cache\n\n### `ENTRYPOINT`\n\n- [ ] Support\n\n### `VOLUME`\n\n- [ ] Format\n- [ ] Any build steps after VOLUME is declare should not change VOLUME contents\n- [ ] If JSON format, double quotes are required\n\n### `USER`\n\n- [x] Should be followed by exactly 1 parameter\n\n### `WORKDIR`\n\n- [x] Validate that it has exactly 1 parameter\n- [x] `WORKDIR` can only expand variables previously set in `ENV` commands\n\n### `ARG`\n\n- [ ] Support\n- [ ] Prevent redefining the built in ARGs (proxy)\n\n### `ONBUILD`\n\n- [ ] Support\n\n### `STOPSIGNAL`\n\n- [ ] Validate input\n- [ ] Only present one time\n\n### `HEALTHCHECK`\n- [x] No additional parameters when only parameter is `NONE`\n- [x] Options before `CMD` are valid\n- [x] Options before `CMD` have additional arguments\n\n### Misc\n\n- [x] Only valid Dockerfile commands are present\n- [x] All commands should have at least 1 parameter\n- [x] Check that commands are written as upper case commands\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplicatedhq%2Fdockerfilelint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freplicatedhq%2Fdockerfilelint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplicatedhq%2Fdockerfilelint/lists"}