@xenos1996/usa 2.25.2 → 2.25.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -1
- package/rules/core/supply-chain.yaml +23 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xenos1996/usa",
|
|
3
|
-
"version": "2.25.
|
|
3
|
+
"version": "2.25.3",
|
|
4
4
|
"description": "Universal Software Auditor — an open-source, self-adapting audit framework for any project, any stack, any stage",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -88,6 +88,8 @@
|
|
|
88
88
|
"build": "tsc -p tsconfig.json",
|
|
89
89
|
"usa": "node --experimental-strip-types src/cli.ts",
|
|
90
90
|
"lint": "eslint .",
|
|
91
|
+
"actions:pin": "node scripts/pin-actions.mjs",
|
|
92
|
+
"actions:check": "node scripts/pin-actions.mjs --check",
|
|
91
93
|
"lint:fix": "eslint . --fix",
|
|
92
94
|
"format": "prettier --write .",
|
|
93
95
|
"format:check": "prettier --check .",
|
|
@@ -204,7 +204,7 @@ rules:
|
|
|
204
204
|
tags: [github-actions]
|
|
205
205
|
|
|
206
206
|
- id: SUP-010
|
|
207
|
-
title: Third-party actions are pinned to a
|
|
207
|
+
title: Third-party actions are pinned to a commit SHA
|
|
208
208
|
section: S3
|
|
209
209
|
section_title: Supply Chain & Build Provenance
|
|
210
210
|
severity: MEDIUM
|
|
@@ -212,11 +212,30 @@ rules:
|
|
|
212
212
|
applies_when: { fact: 'ci:github-actions' }
|
|
213
213
|
check:
|
|
214
214
|
kind: grep_absent
|
|
215
|
-
|
|
215
|
+
# Anything that is not a 40-hex commit SHA is a moving target: even a
|
|
216
|
+
# semver tag like `@v4` is a mutable ref the upstream owner can repoint,
|
|
217
|
+
# so the next run executes a different commit with our secrets in scope.
|
|
218
|
+
# This used to match only `@main|@master|@latest`, which let every `@vN`
|
|
219
|
+
# tag through — the exact drift OpenSSF Scorecard's Pinned-Dependencies
|
|
220
|
+
# check flags, and the gap that produced 59 findings on this repo.
|
|
221
|
+
#
|
|
222
|
+
# The lookahead requires 40 hex chars AND a following boundary, so a
|
|
223
|
+
# 40-hex prefix of a longer ref (`…aaaa` + `zzz`) is still a failure.
|
|
224
|
+
# The `.github/workflows/*` include list plus the fact gate above keep
|
|
225
|
+
# this scoped to GitHub Actions; a Docker `image: …@sha256:` digest is a
|
|
226
|
+
# different syntax and not matched.
|
|
227
|
+
#
|
|
228
|
+
# `^(?!\s*#)` skips comment lines. Without it the rule matches prose
|
|
229
|
+
# that merely quotes the syntax — it flagged this repo's own ci.yml
|
|
230
|
+
# comment explaining the rule, the same self-match that hit
|
|
231
|
+
# scripts/pin-actions.mjs in the same session. A rule that fires on its
|
|
232
|
+
# own documentation is a false positive; comments are not directives.
|
|
233
|
+
pattern: '^(?!\s*#).*uses:\s*(?:[\w.-]+\/)+[\w.-]+@(?!([0-9a-f]{40})(?:\s|$))'
|
|
216
234
|
include: ['.github/workflows/*.yml', '.github/workflows/*.yaml']
|
|
217
235
|
flags: i
|
|
218
|
-
why: '`@main`
|
|
219
|
-
remediation: 'Pin to a full commit SHA
|
|
236
|
+
why: 'A mutable ref (`@v4`, `@main`) lets the upstream owner — or anyone who compromises them — run arbitrary code with your tokens; only a commit SHA is immutable.'
|
|
237
|
+
remediation: 'Pin to a full commit SHA with the version in a trailing comment (`uses: owner/action@<40-hex> # vX.Y.Z`), which keeps Dependabot able to raise update PRs. `node scripts/pin-actions.mjs` rewrites every workflow in place; `--check` fails if any ref drifts back.'
|
|
238
|
+
note: 'Tightened 2026-09-17 after OpenSSF Scorecard reported 59 unpinned actions. The trailing `# vX.Y.Z` comment is load-bearing: without it Dependabot cannot update a SHA pin.'
|
|
220
239
|
references: ['OpenSSF-Scorecard:Pinned-Dependencies']
|
|
221
240
|
|
|
222
241
|
- id: SUP-011
|