sett-and-hive / sarif-to-comment-action

A GitHub action for @security-alert/sarif-to-comment
MIT License
7 stars 4 forks source link

story: refactor Node dependency pins #295

Open wesley-dean-flexion opened 2 months ago

wesley-dean-flexion commented 2 months ago

Describe the User Story

As a security engineer, so that Node dependencies can be managed by automated tooling (e.g., Depenabot, Renovate, npm audit, etc.), I would like Node dependencies specifications to be removed from source files (e.g., the Dockerfile) and placed, instead, in a file intended for dependency tracking (e.g., package.json).

Acceptance Criteria

Definition of Done

Additional Information

If a package.json (or similar.. whatever) approach is used, the setup action becomes more generalized from "install this version of this package" to "install the required dependencies"

steps:
- uses: actions/setup-node@v4
- run: npm ci

This applies not only to GitHub Actions at runtime, but also Docker image builds. So, it would go from

RUN npm install ...

to

WORKDIR /destination/
COPY file /destination/
RUN npm ci

Related Feature Request

257