Fix security workflow findings from the first real trial - #2
Merged
Merged
Conversation
- composer audit: use --locked; Composer 2.10 refuses to audit without vendor/ otherwise - Env file check: allow template suffixes (.dist, .sample, .template, .tpl, .j2, .jinja, .jinja2); the trial flagged a Jinja deployment template - Add working-directory for the npm hardening and audit checks - Self-check: run security.yml on a fixture with lock files and an env template, so both cases are covered - README: document the moving short tag and immutable release tags
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first real run of
security.yml@v0.1(in annotation-management-system) found two bugs. This repository has nocomposer.lockand no env template at its root, so the self-check could not see them.composer auditwithoutvendor/. The job now runscomposer audit --locked, which readscomposer.lockdirectly..github/templates/.env.j2, a Jinja deployment template. Template suffixes (.dist,.sample,.template,.tpl,.j2,.jinja,.jinja2) are now allowed. Real env files such as.envor.env.productionstill fail.Also:
working-directoryinput for the npm hardening and audit checks, and inverify-npm-hardening.tests/fixtures/security/with no dependencies: lock files, a hardened.npmrcand a Jinja.envtemplate. The self-check runssecurity.ymlagainst it.v0.1.1), and the short tagv0.1moves to the latest release.Release plan after merge: tag
v0.1.1and movev0.1to it.