@xenos1996/usat 1.0.0
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/LICENSE +21 -0
- package/README.md +335 -0
- package/USAT.md +596 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +438 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +7 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +72 -0
- package/dist/config.js.map +1 -0
- package/dist/detect/index.d.ts +58 -0
- package/dist/detect/index.d.ts.map +1 -0
- package/dist/detect/index.js +329 -0
- package/dist/detect/index.js.map +1 -0
- package/dist/engine/audit.d.ts +21 -0
- package/dist/engine/audit.d.ts.map +1 -0
- package/dist/engine/audit.js +295 -0
- package/dist/engine/audit.js.map +1 -0
- package/dist/engine/diff.d.ts +24 -0
- package/dist/engine/diff.d.ts.map +1 -0
- package/dist/engine/diff.js +136 -0
- package/dist/engine/diff.js.map +1 -0
- package/dist/engine/evaluate.d.ts +19 -0
- package/dist/engine/evaluate.d.ts.map +1 -0
- package/dist/engine/evaluate.js +377 -0
- package/dist/engine/evaluate.js.map +1 -0
- package/dist/engine/gate.d.ts +19 -0
- package/dist/engine/gate.d.ts.map +1 -0
- package/dist/engine/gate.js +47 -0
- package/dist/engine/gate.js.map +1 -0
- package/dist/engine/loader.d.ts +22 -0
- package/dist/engine/loader.d.ts.map +1 -0
- package/dist/engine/loader.js +360 -0
- package/dist/engine/loader.js.map +1 -0
- package/dist/engine/maturity.d.ts +20 -0
- package/dist/engine/maturity.d.ts.map +1 -0
- package/dist/engine/maturity.js +157 -0
- package/dist/engine/maturity.js.map +1 -0
- package/dist/engine/score.d.ts +19 -0
- package/dist/engine/score.d.ts.map +1 -0
- package/dist/engine/score.js +141 -0
- package/dist/engine/score.js.map +1 -0
- package/dist/engine/sections.d.ts +14 -0
- package/dist/engine/sections.d.ts.map +1 -0
- package/dist/engine/sections.js +50 -0
- package/dist/engine/sections.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/report/markdown.d.ts +16 -0
- package/dist/report/markdown.d.ts.map +1 -0
- package/dist/report/markdown.js +488 -0
- package/dist/report/markdown.js.map +1 -0
- package/dist/types.d.ts +282 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +16 -0
- package/dist/types.js.map +1 -0
- package/dist/util/glob.d.ts +11 -0
- package/dist/util/glob.d.ts.map +1 -0
- package/dist/util/glob.js +86 -0
- package/dist/util/glob.js.map +1 -0
- package/dist/util/project.d.ts +72 -0
- package/dist/util/project.d.ts.map +1 -0
- package/dist/util/project.js +586 -0
- package/dist/util/project.js.map +1 -0
- package/dist/util/yaml.d.ts +28 -0
- package/dist/util/yaml.d.ts.map +1 -0
- package/dist/util/yaml.js +48 -0
- package/dist/util/yaml.js.map +1 -0
- package/docs/ARCHITECTURE.md +119 -0
- package/docs/README.md +27 -0
- package/docs/adr/0001-record-architecture-decisions.md +35 -0
- package/docs/adr/0002-typescript-engine-over-python.md +49 -0
- package/docs/adr/0003-rules-are-data-not-code.md +50 -0
- package/docs/adr/0004-markdown-only-output.md +41 -0
- package/docs/adr/0005-maturity-dampens-severity.md +56 -0
- package/docs/adr/0006-severity-status-two-axes.md +48 -0
- package/docs/adr/0007-suppressions-are-visible-and-expiring.md +46 -0
- package/docs/adr/0008-report-trailer-and-diff.md +48 -0
- package/docs/adr/0009-fail-closed-on-malformed-input.md +56 -0
- package/docs/adr/0010-detector-design.md +54 -0
- package/docs/adr/0011-coexist-with-deep-scanners.md +52 -0
- package/docs/adr/README.md +32 -0
- package/docs/agent-integration.md +129 -0
- package/docs/ci-integration.md +163 -0
- package/docs/concepts.md +196 -0
- package/docs/configuration.md +105 -0
- package/docs/detectors.md +186 -0
- package/docs/getting-started.md +99 -0
- package/docs/maturity-profiles.md +156 -0
- package/docs/reference/api.md +193 -0
- package/docs/reference/cli.md +412 -0
- package/docs/rule-packs.md +278 -0
- package/docs/standards-mapping.md +171 -0
- package/package.json +96 -0
- package/rules/core/architecture.yaml +190 -0
- package/rules/core/cicd.yaml +212 -0
- package/rules/core/code-quality.yaml +261 -0
- package/rules/core/dependencies.yaml +132 -0
- package/rules/core/documentation.yaml +119 -0
- package/rules/core/future-readiness.yaml +91 -0
- package/rules/core/release.yaml +131 -0
- package/rules/core/repo.yaml +303 -0
- package/rules/core/security.yaml +494 -0
- package/rules/core/supply-chain.yaml +357 -0
- package/rules/core/testing.yaml +260 -0
- package/rules/detectors.yaml +2255 -0
- package/rules/index.yaml +41 -0
- package/rules/profiles/maturity.yaml +135 -0
- package/rules/stacks/ai-era.yaml +193 -0
- package/rules/stacks/api-backend.yaml +121 -0
- package/rules/stacks/cli.yaml +105 -0
- package/rules/stacks/compliance.yaml +157 -0
- package/rules/stacks/containers.yaml +124 -0
- package/rules/stacks/data.yaml +165 -0
- package/rules/stacks/go.yaml +134 -0
- package/rules/stacks/iac.yaml +128 -0
- package/rules/stacks/jvm.yaml +150 -0
- package/rules/stacks/ml-ai.yaml +140 -0
- package/rules/stacks/mobile.yaml +121 -0
- package/rules/stacks/node-typescript.yaml +166 -0
- package/rules/stacks/python.yaml +175 -0
- package/rules/stacks/rust.yaml +129 -0
- package/rules/stacks/solidity.yaml +139 -0
- package/rules/stacks/web-frontend.yaml +159 -0
- package/templates/AGENTS.audit.md +135 -0
- package/templates/AUDIT_REPORT.md +155 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 USAT contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# 🧠 USAT
|
|
4
|
+
|
|
5
|
+
### Universal Software Audit Template
|
|
6
|
+
|
|
7
|
+
**An open-source, self-adapting audit framework for any project, any stack, any stage.**
|
|
8
|
+
|
|
9
|
+
[](https://github.com/Er-Sajan-PLG/software-auditing-template/actions/workflows/ci.yml)
|
|
10
|
+
[](https://www.npmjs.com/package/@xenos1996/usat)
|
|
11
|
+
[](LICENSE)
|
|
12
|
+
[](rules/)
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
**Most audit checklists are static.** They ask a React prototype to prove multi-region
|
|
19
|
+
failover, and they ask a bank to prove it has a README. The result is noise that gets
|
|
20
|
+
skimmed and ignored.
|
|
21
|
+
|
|
22
|
+
**USAT adapts.** It detects what your project actually is, activates only the sections
|
|
23
|
+
that apply, grades you against a bar appropriate to your stage, and tells you what to
|
|
24
|
+
fix first — with a reproducible score you can diff against last quarter's.
|
|
25
|
+
|
|
26
|
+
It is two things, and you should use both:
|
|
27
|
+
|
|
28
|
+
| | What it does | Why you need it |
|
|
29
|
+
| ------------------------------- | ------------------------------------------------------------- | ---------------------------------------------------------- |
|
|
30
|
+
| **`rules/` + `usat` CLI** | Deterministic checks: everything answerable by reading a file | Reproducible, fast, CI-gateable, diffable |
|
|
31
|
+
| **`USAT.md` + judgement queue** | The parts only reasoning can settle | Coupling, authorisation, threat modelling, product context |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## ⚡ Quick start
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Audit any project — no install, no config, no network
|
|
39
|
+
npx @xenos1996/usat audit .
|
|
40
|
+
|
|
41
|
+
# See what it detected before you trust the report
|
|
42
|
+
npx @xenos1996/usat detect .
|
|
43
|
+
|
|
44
|
+
# Deep audit, graded against the production bar
|
|
45
|
+
npx @xenos1996/usat audit ~/code/api --depth deep --profile production
|
|
46
|
+
|
|
47
|
+
# Fail the build on HIGH or worse
|
|
48
|
+
npx @xenos1996/usat audit . --fail-on high
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
That writes `AUDIT.md` — a single self-contained Markdown file you can commit, paste
|
|
52
|
+
into a PR, or email to a client.
|
|
53
|
+
|
|
54
|
+
<details>
|
|
55
|
+
<summary><b>What the report looks like</b> (abridged)</summary>
|
|
56
|
+
|
|
57
|
+
```markdown
|
|
58
|
+
## 📊 Executive Summary
|
|
59
|
+
|
|
60
|
+
### Overall Health Score: 71.4/100
|
|
61
|
+
|
|
62
|
+
`█████████████████░░░░░░░`
|
|
63
|
+
|
|
64
|
+
Expected band for Beta / Growing: 60–85 — within the expected band 👍
|
|
65
|
+
|
|
66
|
+
| Dimension | Score | Confidence |
|
|
67
|
+
| ------------------------------------ | ------ | ---------- |
|
|
68
|
+
| S1 · Repository & Project Structure | 8.4/10 | 72.7% |
|
|
69
|
+
| S2 · Security | 6.2/10 | 100% |
|
|
70
|
+
| S3 · Supply Chain & Build Provenance | 5.1/10 | 100% |
|
|
71
|
+
| S7 · Testing & Quality Assurance | 7.5/10 | 80% |
|
|
72
|
+
|
|
73
|
+
## 🚨 Immediate Action Required
|
|
74
|
+
|
|
75
|
+
1. 🔴 **No hardcoded credentials in source** · `SEC-001`
|
|
76
|
+
- **Where:** `src/config.js:3`, `src/config.js:4`
|
|
77
|
+
- **Why:** 2 occurrence(s): `api_key: 'example_key_not_real_12345',` at src/config.js:3 (+1 more)
|
|
78
|
+
- **Fix:** Move to environment variables backed by a secret manager…
|
|
79
|
+
|
|
80
|
+
## 🧠 Judgement Queue (agent / human review)
|
|
81
|
+
|
|
82
|
+
| Rule | Section | Severity | What to look for | Evidence to record |
|
|
83
|
+
| ----------------------------------------------- | ------- | -------- | ---------------- | -------------------------------- |
|
|
84
|
+
| `SEC-015` Authorization is enforced per request | S2 | 🟠 HIGH | … | file:line of the ownership check |
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
That excerpt is real output, generated by running USAT against
|
|
88
|
+
[`examples/demo-app`](examples/demo-app) — a small, deliberately vulnerable
|
|
89
|
+
Express service kept in this repo so you can reproduce the findings yourself:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
usat audit examples/demo-app --out /tmp/demo.md
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
See the full report: [`examples/sample-report.md`](examples/sample-report.md).
|
|
96
|
+
|
|
97
|
+
</details>
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## 🔍 How it adapts
|
|
102
|
+
|
|
103
|
+
**1 · Detect.** ~200 declarative signals in [`rules/detectors.yaml`](rules/detectors.yaml)
|
|
104
|
+
produce facts about your project — language, framework, package manager, platform,
|
|
105
|
+
database, auth, CI, AI stack, and more.
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
$ usat detect .
|
|
109
|
+
maturity: beta
|
|
110
|
+
lang: typescript fw: next, react, tailwind
|
|
111
|
+
pm: pnpm db: postgres, redis
|
|
112
|
+
orm: prisma auth: jwt, oauth
|
|
113
|
+
ci: github-actions has: tests, containers, monitoring
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**2 · Select.** Every rule declares `applies_when`. A Solidity pack skips a Next.js
|
|
117
|
+
blog; a mobile pack skips a CLI. Packs can also assert facts, so enabling a monorepo
|
|
118
|
+
pack pulls in boundary checks automatically.
|
|
119
|
+
|
|
120
|
+
**3 · Dampen.** The detected maturity stage adjusts severity. A prototype is not graded
|
|
121
|
+
like a bank — **but 🔴 CRITICAL is never dampened, at any stage.**
|
|
122
|
+
|
|
123
|
+
**4 · Score.** Weighted, deterministic, reproducible. Sections that could not be
|
|
124
|
+
verified report _"not verified"_ rather than quietly scoring 10.
|
|
125
|
+
|
|
126
|
+
**5 · Diff.** Every report embeds a machine-readable trailer:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
usat diff reports/2026-06.md reports/2026-09.md
|
|
130
|
+
# ✅ Fixed (7) · 🔺 Regressed (1) · 🆕 Newly applicable (3) · Net +11.2 points
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## 📊 The severity model
|
|
136
|
+
|
|
137
|
+
Two axes kept separate — this is what makes the score reproducible instead of vibes.
|
|
138
|
+
|
|
139
|
+
**Severity** (how bad, if violated): 🔴 `CRITICAL` · 🟠 `HIGH` · 🟡 `MEDIUM` · 🟢 `LOW` · 🔵 `FUTURE`
|
|
140
|
+
|
|
141
|
+
**Status** (what was observed):
|
|
142
|
+
|
|
143
|
+
| | Status | Means | Score credit |
|
|
144
|
+
| --- | -------------- | --------------------------------------- | ------------ |
|
|
145
|
+
| ✅ | `GOOD` | Verified present and correct | 1.00 |
|
|
146
|
+
| 🧪 | `EXPERIMENTAL` | Present, unvalidated | 0.50 |
|
|
147
|
+
| 💀 | `DEPRECATED` | Present, EOL | 0.40 |
|
|
148
|
+
| ⚠️ | `WRONG` | Present but **incorrectly implemented** | 0.15 |
|
|
149
|
+
| 🚫 | `MISSING` | Required and absent | 0.00 |
|
|
150
|
+
| ❓ | `NEEDS REVIEW` | Judgement required | excluded |
|
|
151
|
+
| ➖ | `SKIPPED` | Not applicable | excluded |
|
|
152
|
+
|
|
153
|
+
> ⚠️ `WRONG` scores above `MISSING` on purpose. Something exists, so there is partial
|
|
154
|
+
> credit — but a wrong implementation is _more dangerous_ than nothing, because it
|
|
155
|
+
> looks finished. Most checklists only have a box for "is it there".
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## 🌱 Maturity profiles — the "any stage" part
|
|
160
|
+
|
|
161
|
+
| Stage | Detected when | Security | Docs / Style | Expected |
|
|
162
|
+
| ------------- | ------------------------------------ | -------- | ------------ | -------- |
|
|
163
|
+
| 🌱 Prototype | no tests, no CI, no history | −1 step | −2 steps | 30–65 |
|
|
164
|
+
| 🚀 MVP | some process, real users | −0 | −2 steps | 45–75 |
|
|
165
|
+
| 🧪 Beta | CI + tests + changelog | −0 | −1 step | 60–85 |
|
|
166
|
+
| 🏭 Production | score ≥7 **and** release tags | −0 | −0 | 75–95 |
|
|
167
|
+
| 🏚️ Legacy | ~18 months idle, or stale without CI | −0 | −1 step | 40–70 |
|
|
168
|
+
|
|
169
|
+
> **Hard rule: 🔴 CRITICAL is never dampened.** A leaked credential in a weekend
|
|
170
|
+
> prototype is still a leaked credential. Everything else is negotiable with the calendar.
|
|
171
|
+
|
|
172
|
+
Override it: `usat audit . --profile production` — the "what would it take to ship this?" view.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## 📦 What it checks
|
|
177
|
+
|
|
178
|
+
**16 sections**, S1–S16, in [`USAT.md`](USAT.md) — the human/agent-facing document.
|
|
179
|
+
|
|
180
|
+
**200+ rules** in [`rules/`](rules) — the machine-facing ones:
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
rules/
|
|
184
|
+
├── index.yaml pack registry
|
|
185
|
+
├── detectors.yaml ~200 detection signals → facts
|
|
186
|
+
├── sections.yaml section weights (override the defaults)
|
|
187
|
+
├── profiles/maturity.yaml the five lifecycle profiles
|
|
188
|
+
├── core/ 11 universal packs
|
|
189
|
+
│ ├── repo.yaml ├── security.yaml ├── supply-chain.yaml
|
|
190
|
+
│ ├── architecture.yaml ├── code-quality.yaml ├── testing.yaml
|
|
191
|
+
│ ├── cicd.yaml ├── release.yaml ├── dependencies.yaml
|
|
192
|
+
│ ├── documentation.yaml └── future-readiness.yaml
|
|
193
|
+
└── stacks/ 16 conditional packs
|
|
194
|
+
├── node-typescript ├── python ├── go ├── rust
|
|
195
|
+
├── jvm ├── web-frontend├── mobile ├── containers
|
|
196
|
+
├── iac ├── solidity ├── ml-ai ├── cli
|
|
197
|
+
├── data ├── api-backend ├── compliance └── ai-era
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### What USAT adds beyond a conventional audit checklist
|
|
201
|
+
|
|
202
|
+
| Addition | Why |
|
|
203
|
+
| --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
204
|
+
| **S3 Supply Chain & Provenance** as its own section | You can write flawless code and still ship someone else's backdoor. SLSA v1.2, NIST SSDF, OpenSSF Scorecard. |
|
|
205
|
+
| **S9 Release & Change Management** | The gap between "we deploy" and "we ship": versioning, migration ordering, flags, runbooks. |
|
|
206
|
+
| **S14 AI / LLM-Era Risks** | Mapped to OWASP LLM Top 10 (2026) and OWASP Agentic AI Top 10 (ASI, 2026). Prompt injection, excessive agency, unbounded consumption, RAG tenant leakage. |
|
|
207
|
+
| **⚠️ WRONG as a distinct status** | Present-but-incorrect is worse than absent. Rule 9 of the agent behaviour rules. |
|
|
208
|
+
| **Maturity-aware severity dampening** | Stage-appropriate grading, with a hard floor on CRITICAL. |
|
|
209
|
+
| **Approved-risk suppressions** | Decisions you made deliberately stay visible but stop costing points. Each needs a reason and an optional expiry. |
|
|
210
|
+
| **Confidence, not just score** | A 90/100 at 40% confidence means a fifth of the surface was never checked. |
|
|
211
|
+
| **`usat diff`** | An audit you cannot compare to the last one is just a number. |
|
|
212
|
+
|
|
213
|
+
See [`docs/standards-mapping.md`](docs/standards-mapping.md) for the full comparison
|
|
214
|
+
against OWASP ASVS 5.0, NIST SSDF, SLSA, OpenSSF Scorecard, CII Best Practices,
|
|
215
|
+
ISO/IEC 5055, WCAG 2.2, and the EU CRA.
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## 🤖 Use it with an AI agent
|
|
220
|
+
|
|
221
|
+
USAT is designed to be driven by an agent: the tool settles everything mechanical, and
|
|
222
|
+
the agent works the **judgement queue** — the checks that cannot be settled by grep,
|
|
223
|
+
each with the evidence it needs recorded.
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
usat audit . # deterministic pass
|
|
227
|
+
# → then: "Read USAT.md and AUDIT.md, and work the Judgement Queue.
|
|
228
|
+
# For each item, find the evidence and record file:line."
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Ready-made packs:
|
|
232
|
+
|
|
233
|
+
- [`skills/usat-audit/SKILL.md`](skills/usat-audit/SKILL.md) — Agent Skills format
|
|
234
|
+
(Claude Code, Cursor, Codex, Copilot, Gemini CLI; drop into your skills dir)
|
|
235
|
+
- [`templates/AGENTS.audit.md`](templates/AGENTS.audit.md) — paste into any repo as `AGENTS.md`
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## 🔧 Configuration
|
|
240
|
+
|
|
241
|
+
`usat init` scaffolds `.usat.yaml`:
|
|
242
|
+
|
|
243
|
+
```yaml
|
|
244
|
+
version: 1
|
|
245
|
+
# maturity: production # override auto-detection
|
|
246
|
+
# include: [stacks/solidity] # force a pack on
|
|
247
|
+
# exclude: [stacks/mobile] # force a pack off
|
|
248
|
+
rules:
|
|
249
|
+
DOC-003:
|
|
250
|
+
severity: LOW
|
|
251
|
+
reason: 'Docs live in Notion (decision: ADR-014)'
|
|
252
|
+
suppressions:
|
|
253
|
+
- rule: PERF-005
|
|
254
|
+
reason: 'Known N+1 in the admin panel; 40 rows max.'
|
|
255
|
+
until: '2026-12-31'
|
|
256
|
+
ignore: [] # extra globs to exclude from indexing
|
|
257
|
+
facts: [] # assert facts detection missed, e.g. "has:database"
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Full reference: [`docs/configuration.md`](docs/configuration.md).
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## 🚦 CI
|
|
265
|
+
|
|
266
|
+
Add to any workflow ([`action.yml`](action.yml) is a composite action if you prefer):
|
|
267
|
+
|
|
268
|
+
```yaml
|
|
269
|
+
- name: USAT audit
|
|
270
|
+
run: npx @xenos1996/usat audit . --fail-on high
|
|
271
|
+
|
|
272
|
+
- name: Publish report
|
|
273
|
+
if: always()
|
|
274
|
+
run: cat AUDIT.md >> "$GITHUB_STEP_SUMMARY"
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
`usat init` writes a complete workflow for you, and this repo audits itself on every PR
|
|
278
|
+
([`.github/workflows/self-audit.yml`](.github/workflows/self-audit.yml)).
|
|
279
|
+
|
|
280
|
+
| Exit code | Meaning |
|
|
281
|
+
| --------- | --------------------------------------------------- |
|
|
282
|
+
| `0` | No findings at or above `--fail-on` (default: none) |
|
|
283
|
+
| `1` | Gate tripped |
|
|
284
|
+
| `2` | Usage or configuration error |
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## 📚 Documentation
|
|
289
|
+
|
|
290
|
+
| Doc | What's in it |
|
|
291
|
+
| -------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
|
292
|
+
| [`USAT.md`](USAT.md) | **The template itself** — every section, every check, the agent behaviour rules |
|
|
293
|
+
| [`docs/getting-started.md`](docs/getting-started.md) | Install, first audit, reading the report |
|
|
294
|
+
| [`docs/concepts.md`](docs/concepts.md) | Severity × status, scoring maths, confidence |
|
|
295
|
+
| [`docs/rule-packs.md`](docs/rule-packs.md) | Author your own packs — every check kind, with examples |
|
|
296
|
+
| [`docs/detectors.md`](docs/detectors.md) | The fact catalogue and how to add signals |
|
|
297
|
+
| [`docs/maturity-profiles.md`](docs/maturity-profiles.md) | Lifecycle stages and dampening rules |
|
|
298
|
+
| [`docs/agent-integration.md`](docs/agent-integration.md) | Driving USAT from Claude/Cursor/Codex/Copilot |
|
|
299
|
+
| [`docs/ci-integration.md`](docs/ci-integration.md) | GitHub Actions, GitLab CI, quality gates |
|
|
300
|
+
| [`docs/standards-mapping.md`](docs/standards-mapping.md) | USAT ↔ ASVS 5.0, SSDF, SLSA, Scorecard, ISO 5055, WCAG, CRA |
|
|
301
|
+
| [`docs/configuration.md`](docs/configuration.md) | `.usat.yaml` reference |
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## 🛠️ Contributing
|
|
306
|
+
|
|
307
|
+
Rule packs are the easiest high-value contribution — one YAML file, no TypeScript.
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
git clone https://github.com/Er-Sajan-PLG/software-auditing-template
|
|
311
|
+
cd software-auditing-template
|
|
312
|
+
npm install && npm test
|
|
313
|
+
npm run usat -- audit . # run the CLI from source
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
See [`CONTRIBUTING.md`](CONTRIBUTING.md). Good first contributions:
|
|
317
|
+
|
|
318
|
+
- **A stack pack** for a language or framework we do not cover yet
|
|
319
|
+
- **A detector** for a technology USAT fails to notice
|
|
320
|
+
- **A false positive** you hit — rules should be precise, not noisy
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## ⚠️ What USAT is not
|
|
325
|
+
|
|
326
|
+
- **Not a penetration test.** No dynamic analysis, no fuzzing. It finds open doors; it does not walk through them.
|
|
327
|
+
- **Not a replacement for CodeQL / Semgrep / Snyk / Trivy.** It checks whether those are _configured_ and tells you to run them.
|
|
328
|
+
- **Not a compliance certification.** It maps to the standards and tells you what evidence you would need. An auditor still certifies.
|
|
329
|
+
- **Not a code review.** It does not understand your product.
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
## 📄 Licence
|
|
334
|
+
|
|
335
|
+
MIT — see [`LICENSE`](LICENSE). Use it commercially, fork it, ship it, send rule packs back.
|