SR-004 — Automated Security Scanning: System Requirements

By Engineering Team•October 12, 2026•4 min read
Metadata Details
System Name astro-static-site Security Scanning Specifications
Document ID SR-STATIC-004
Author Engineering Team
Status Draft / Implementation

Traces back to BRD-004 — Automated Security Scanning at No Licence Cost. Requirement IDs repeat those of other SRs; cite them with the document ID (e.g. SR-004 SR-F-01).


1. Functional System Requirements

ID Description Traceability (BRD)
SR-F-01 (Dependency Scan) Each scan run is a Trivy filesystem scan of package.json and the lockfile against public vulnerability databases. BR-1.1
SR-F-02 (Secret Scan) The same run scans the repository for committed secrets and credentials. BR-1.1
SR-F-03 (Severity Gate) The run fails, blocking release, when a finding of HIGH or CRITICAL severity is reported. Lower severities are reported without failing. BR-2.1
SR-F-04 (Reviewable Output) Findings are printed as a table in the scan job’s log (package, installed version, vulnerability, fixed version). Code scanning (SARIF upload) is not available on this private repository. BR-2.1
SR-F-05 (Scan on Every Release) The scan runs in every release run of infra.yml and app.yml, before any plan or build. No scan runs on a pull request or on a schedule (ADR-005): a vulnerability published against unchanged dependencies is found at the next release. BR-1.1

2. Non-Functional & Security Requirements

ID Specification Traceability (BRD)
SR-NF-01 (No Licence Cost) The scanner is open source and requires no account, token or paid plan. Only CI runner minutes are consumed. BR-1.2
SR-NF-02 (Portability) The scan is a single CLI invocation that also runs locally and in any CI system; no website code depends on it. BR-1.3
SR-NF-03 (Scope Fit) Scanning covers dependencies, secrets and configuration files only. Code-flow analysis (SAST) is not required for a static site with no server code. BR-2.2
SR-NF-04 (Pinned Tooling) The scanner action and its version are pinned, never latest. BR-1.1

3. Open Items

  • Gate on fixable findings only. Failing on every HIGH finding can block releases on issues with no available fix. Consider ignore-unfixed and a reviewed .trivyignore with expiry dates.
  • Build-time vs. runtime exposure. Most findings affect build tooling, not shipped output. Triage should record whether a finding can reach readers.
  • No automatic fix PRs. Trivy reports only. Version bumps are manual or require a separate dependency-update bot; decide whether one is wanted.
  • Database availability. Scans download a vulnerability database; rate limits or outages can fail runs. The workflows cache it between runs.
  • Pipeline wiring. Where the scan runs is specified in SR-005.