@xenos1996/usa 2.25.1 → 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/README.md +2 -2
- package/dist/cli.js +0 -0
- package/package.json +34 -24
- package/rules/core/supply-chain.yaml +23 -4
package/README.md
CHANGED
|
@@ -320,8 +320,8 @@ Rule packs are the easiest high-value contribution — one YAML file, no TypeScr
|
|
|
320
320
|
```bash
|
|
321
321
|
git clone https://github.com/Er-Sajan-PLG/universal-software-auditor
|
|
322
322
|
cd universal-software-auditor
|
|
323
|
-
|
|
324
|
-
|
|
323
|
+
pnpm install && pnpm test
|
|
324
|
+
pnpm run usa -- audit . # run the CLI from source
|
|
325
325
|
```
|
|
326
326
|
|
|
327
327
|
Agents and humans doing repo work: read `AGENTS.md` first — it holds
|
package/dist/cli.js
CHANGED
|
File without changes
|
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",
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
"README.md",
|
|
25
25
|
"LICENSE"
|
|
26
26
|
],
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public",
|
|
29
|
+
"provenance": true
|
|
30
|
+
},
|
|
27
31
|
"keywords": [
|
|
28
32
|
"audit",
|
|
29
33
|
"software-audit",
|
|
@@ -52,28 +56,6 @@
|
|
|
52
56
|
"engines": {
|
|
53
57
|
"node": ">=20.0.0"
|
|
54
58
|
},
|
|
55
|
-
"scripts": {
|
|
56
|
-
"build": "tsc -p tsconfig.json",
|
|
57
|
-
"usa": "node --experimental-strip-types src/cli.ts",
|
|
58
|
-
"lint": "eslint .",
|
|
59
|
-
"lint:fix": "eslint . --fix",
|
|
60
|
-
"format": "prettier --write .",
|
|
61
|
-
"format:check": "prettier --check .",
|
|
62
|
-
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
63
|
-
"test": "vitest run",
|
|
64
|
-
"test:watch": "vitest",
|
|
65
|
-
"test:cov": "vitest run --coverage",
|
|
66
|
-
"self-audit": "npm run build && node dist/cli.js audit . --out AUDIT.md",
|
|
67
|
-
"docs:sync": "node scripts/sync-docs.mjs",
|
|
68
|
-
"docs:check": "node scripts/check-docs.mjs",
|
|
69
|
-
"docs:adrs": "node scripts/check-adrs.mjs",
|
|
70
|
-
"docs:cli": "node scripts/gen-cli-docs.mjs --check",
|
|
71
|
-
"docs:sample": "node scripts/gen-sample-report.mjs --check",
|
|
72
|
-
"docs:asvs": "node scripts/gen-asvs-coverage.mjs --check",
|
|
73
|
-
"docs:links": "node scripts/check-links.mjs",
|
|
74
|
-
"docs:all": "npm run docs:adrs && npm run docs:check && npm run docs:cli && npm run docs:sample && npm run docs:asvs",
|
|
75
|
-
"prepublishOnly": "npm run build"
|
|
76
|
-
},
|
|
77
59
|
"lint-staged": {
|
|
78
60
|
"*.{js,ts,mjs,cjs}": [
|
|
79
61
|
"eslint --fix",
|
|
@@ -87,6 +69,8 @@
|
|
|
87
69
|
"yaml": "^2.6.1"
|
|
88
70
|
},
|
|
89
71
|
"devDependencies": {
|
|
72
|
+
"@changesets/changelog-github": "^1.0.1",
|
|
73
|
+
"@changesets/cli": "^3.0.3",
|
|
90
74
|
"@commitlint/cli": "^21.2.2",
|
|
91
75
|
"@commitlint/config-conventional": "^21.2.2",
|
|
92
76
|
"@eslint/js": "^10.0.1",
|
|
@@ -99,5 +83,31 @@
|
|
|
99
83
|
"typescript": "^5.7.3",
|
|
100
84
|
"typescript-eslint": "^8.20.0",
|
|
101
85
|
"vitest": "^5.0.0"
|
|
86
|
+
},
|
|
87
|
+
"scripts": {
|
|
88
|
+
"build": "tsc -p tsconfig.json",
|
|
89
|
+
"usa": "node --experimental-strip-types src/cli.ts",
|
|
90
|
+
"lint": "eslint .",
|
|
91
|
+
"actions:pin": "node scripts/pin-actions.mjs",
|
|
92
|
+
"actions:check": "node scripts/pin-actions.mjs --check",
|
|
93
|
+
"lint:fix": "eslint . --fix",
|
|
94
|
+
"format": "prettier --write .",
|
|
95
|
+
"format:check": "prettier --check .",
|
|
96
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
97
|
+
"test": "vitest run",
|
|
98
|
+
"test:watch": "vitest",
|
|
99
|
+
"test:cov": "vitest run --coverage",
|
|
100
|
+
"self-audit": "npm run build && node dist/cli.js audit . --out AUDIT.md",
|
|
101
|
+
"docs:sync": "node scripts/sync-docs.mjs",
|
|
102
|
+
"docs:check": "node scripts/check-docs.mjs",
|
|
103
|
+
"docs:adrs": "node scripts/check-adrs.mjs",
|
|
104
|
+
"docs:cli": "node scripts/gen-cli-docs.mjs --check",
|
|
105
|
+
"docs:sample": "node scripts/gen-sample-report.mjs --check",
|
|
106
|
+
"docs:asvs": "node scripts/gen-asvs-coverage.mjs --check",
|
|
107
|
+
"docs:links": "node scripts/check-links.mjs",
|
|
108
|
+
"docs:all": "npm run docs:adrs && npm run docs:check && npm run docs:cli && npm run docs:sample && npm run docs:asvs",
|
|
109
|
+
"changeset": "changeset",
|
|
110
|
+
"version-packages": "changeset version && pnpm run format",
|
|
111
|
+
"release": "pnpm run build && changeset publish"
|
|
102
112
|
}
|
|
103
|
-
}
|
|
113
|
+
}
|
|
@@ -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
|