hex-audit 0.6.1 → 0.6.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/dashboard/.next/BUILD_ID +1 -1
- package/dashboard/.next/app-build-manifest.json +26 -26
- package/dashboard/.next/app-path-routes-manifest.json +1 -1
- package/dashboard/.next/build-manifest.json +2 -2
- package/dashboard/.next/next-minimal-server.js.nft.json +1 -1
- package/dashboard/.next/next-server.js.nft.json +1 -1
- package/dashboard/.next/prerender-manifest.js +1 -1
- package/dashboard/.next/prerender-manifest.json +1 -1
- package/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/_not-found.html +1 -1
- package/dashboard/.next/server/app/_not-found.rsc +1 -1
- package/dashboard/.next/server/app/access/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/calls/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/conformance/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/diagram/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/diagram.html +1 -1
- package/dashboard/.next/server/app/diagram.rsc +1 -1
- package/dashboard/.next/server/app/flows/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/flows.html +1 -1
- package/dashboard/.next/server/app/flows.rsc +1 -1
- package/dashboard/.next/server/app/functions/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/issues/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/notes/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/progress/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/report/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/stats/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app-paths-manifest.json +12 -12
- package/dashboard/.next/server/chunks/530.js +1 -1
- package/dashboard/.next/server/functions-config-manifest.json +1 -1
- package/dashboard/.next/server/middleware-build-manifest.js +1 -1
- package/dashboard/.next/server/pages/404.html +1 -1
- package/dashboard/.next/server/pages/500.html +1 -1
- package/dashboard/.next/server/server-reference-manifest.js +1 -1
- package/dashboard/.next/server/server-reference-manifest.json +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +13 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/skills/generate-report.md +14 -3
- package/dist/skills/ingest-aa-report.md +11 -2
- package/dist/skills/init-audit.md +2 -0
- package/dist/skills/validate-finding.md +10 -1
- package/dist/skills/write-finding.md +16 -6
- package/package.json +1 -1
- /package/dashboard/.next/static/{mIJovZ5WuDGk7ZlzWBn03 → AyrRAwu4mazjp8iX4Yjbb}/_buildManifest.js +0 -0
- /package/dashboard/.next/static/{mIJovZ5WuDGk7ZlzWBn03 → AyrRAwu4mazjp8iX4Yjbb}/_ssgManifest.js +0 -0
|
@@ -120,7 +120,16 @@ Combine the two axes — correctness (Step 2) and security relevance (Step 2.5):
|
|
|
120
120
|
|
|
121
121
|
For a memo-only verdict, the same two commands apply (the PoC fields just stay unset). For `--description-file`, you may pass either the memo or a dedicated description file; prefer a clean description file if the memo is long.
|
|
122
122
|
|
|
123
|
-
Any description you write must be **
|
|
123
|
+
Any description you write must be **structured, readable prose** (no markdown headings), not a single dense block. Split it into short paragraphs that separate how the code is supposed to work (expected behavior / the spec), what is wrong (the flaw), and the impact, and include a fenced ```` ```solidity ```` block of the offending code. Do not introduce paragraphs with bold section labels (`**Summary**:`/`**Impact**:`/`**Details**:`/`**Affected code**:`) — the separation is paragraph breaks, not headers. **Backtick every Solidity identifier**, writing functions as `` `functionName(...)` `` with literal `(...)` and contracts/variables/constants in plain backticks; never leave a bare identifier in the prose. Keep each paragraph tight (no padding), and add a 1–2 sentence hedged recommendation. This matches the finding template used by the dashboard copy and the GitHub issue body. If the affected files are missing or wrong, set them with `--file` (repeatable) rather than narrating them in the description: `npx hex issue patch <id> --file src/Foo.sol [--file src/Bar.sol]`.
|
|
124
|
+
|
|
125
|
+
**A conformance-sourced (or auditagent/github) finding must be rewritten to the exact same standard as a manual `/write-finding` finding** — do not pass the raw source text through. AuditAgent findings in particular arrive as one long unformatted paragraph; reshape them into the structured, backticked, snippet-bearing form above. Specifically, the prose you land must obey the report-facing content rules:
|
|
126
|
+
- **Structure + identifiers:** short expected/flaw/impact paragraphs, a ```solidity snippet, every identifier backticked and functions as `` `name(...)` `` (as above).
|
|
127
|
+
- **Recommendation tone:** hedged (`Consider...`, `One option is...`), never prescriptive (`Replace X with Y`, `You must...`). Follow the project writing style (no em dashes, no banned words / AI giveaways).
|
|
128
|
+
- **No line numbers — show the code.** Never cite specific source lines ("line 56"); line numbers drift. Use the ```solidity block instead, and refer to code by function/variable name. Do not transcribe line numbers from the conformance item's `code_location` into the prose (that field stays internal, for navigation only).
|
|
129
|
+
- **Stand alone — no cross-references** to other findings by Hex id (`H-NNN`) or number/title.
|
|
130
|
+
- **No PoC references** in the description or recommendation.
|
|
131
|
+
|
|
132
|
+
**Normalizing legacy findings:** if you are re-run on a finding whose stored description still contains line numbers, `H-NNN` cross-references, or PoC mentions (authored before these rules), rewrite it now: replace line references with a fenced ```` ```solidity ```` block, drop the id/PoC references, and re-land the cleaned prose via `--description-file`. This (followed by `/sync-issues`) is how an already-synced finding gets cleaned; the report never rewrites GitHub-canonical prose itself.
|
|
124
133
|
|
|
125
134
|
Hex does not write `@audit-issue` comments into the client's source files — the board and finding record are the only place the issue lives.
|
|
126
135
|
|
|
@@ -59,7 +59,7 @@ The `id`, `poc`, and `created_at` fields are managed by `hex issue new` (see Act
|
|
|
59
59
|
"title": "<concise, descriptive title>",
|
|
60
60
|
"severity": "Critical|High|Medium|Low|Info",
|
|
61
61
|
"category": "<e.g., Math / Rounding, Access Control, Reentrancy, Oracle Manipulation>",
|
|
62
|
-
"description": "<
|
|
62
|
+
"description": "<short structured paragraphs (expected behavior, the flaw, the impact) with a fenced solidity snippet and every identifier backticked as `name(...)`; no headings or bold section labels — see Description format below>",
|
|
63
63
|
"root_cause": {
|
|
64
64
|
"locations": [
|
|
65
65
|
{ "file": "<path>", "snippet": "<relevant code>" }
|
|
@@ -90,12 +90,22 @@ Phrase recommendations as suggestions, not commands. The auditor proposes direct
|
|
|
90
90
|
|
|
91
91
|
### Description format (STRICT)
|
|
92
92
|
|
|
93
|
-
The finding is rendered
|
|
93
|
+
The finding is rendered inline after `**Description**:` in the report, so it must be prose (no markdown headings), but it must be **structured and readable**, not a wall of text:
|
|
94
94
|
|
|
95
|
-
- **
|
|
96
|
-
- **
|
|
97
|
-
-
|
|
98
|
-
- **
|
|
95
|
+
- **Split into short paragraphs that separate the parts of the finding.** Cover, in order, how the code is supposed to work (the expected behavior or spec), what is wrong (the flaw), and the impact. Give each its own short paragraph rather than one dense block. Look at how a clean finding reads: a paragraph of context/expected behavior, the offending code, then a paragraph on what breaks and why it matters.
|
|
96
|
+
- **No markdown headings and no bold section labels.** The separation is paragraph breaks, not headers. Do not write `#`/`##`, and do not introduce paragraphs with `**Summary**:`, `**Impact**:`, `**Details**:`, `**Affected code**:` or similar labels — those read as machine-generated. Let the prose carry the structure.
|
|
97
|
+
- **Backtick every Solidity identifier** so the report renders it in monospace. Functions are written as `` `functionName(...)` `` with the literal `(...)`, e.g. `` `deposit(...)` ``, `` `sweepTreasury(...)` ``. Contracts, interfaces, variables, constants, and hex/number literals get plain backticks: `` `CardinalExchange` ``, `` `undeployedLpCapital` ``, `` `feeBps` ``. Standard names (ERC-4626, UUPS, ERC-20) stay as plain text. Never leave a bare identifier in the prose.
|
|
98
|
+
- **Show the offending code.** Include a fenced ```` ```solidity ```` block of the relevant lines (with `@audit-issue` comments per the Code Block Formatting Rules below) rather than describing the code only in words. Keep it minimal — just what's needed to see the issue.
|
|
99
|
+
- Affected file paths belong in `--file` (the File(s) line), not narrated in the description.
|
|
100
|
+
- **Be concise within the structure.** Short paragraphs, no padding, don't restate the title or repeat the recommendation. Readable and specific beats long.
|
|
101
|
+
|
|
102
|
+
### Report-facing content (STRICT)
|
|
103
|
+
|
|
104
|
+
The description, recommendation, and title end up verbatim in the client's published report. Keep them free of anything that only makes sense inside Hex or that rots when the code moves:
|
|
105
|
+
|
|
106
|
+
- **Stand alone — no cross-references to other findings.** Never point at another issue by its Hex id (`H-NNN`) or by its number/title ("see H-005", "as in the previous finding"). Report readers have no Hex ids and sections get reordered. If two issues share a mechanism, describe that mechanism inline in each.
|
|
107
|
+
- **No line numbers — show the code.** Do not cite specific source lines ("line 56", "on lines 43, 55"). Line numbers drift the moment code or comments change. Instead embed a minimal fenced ```` ```solidity ```` block in the description showing the relevant code, and refer to it by function or variable name in the prose. (The report renders those blocks; it also renders `root_cause.locations[].snippet` when a materialized finding carries one.)
|
|
108
|
+
- **No PoC references.** Do not name or link the proof-of-concept test or its path. The PoC belongs in the validation memo (`poc.validation_memo`), which the report never renders.
|
|
99
109
|
|
|
100
110
|
## Code Block Formatting Rules (STRICT)
|
|
101
111
|
|
package/package.json
CHANGED
/package/dashboard/.next/static/{mIJovZ5WuDGk7ZlzWBn03 → AyrRAwu4mazjp8iX4Yjbb}/_buildManifest.js
RENAMED
|
File without changes
|
/package/dashboard/.next/static/{mIJovZ5WuDGk7ZlzWBn03 → AyrRAwu4mazjp8iX4Yjbb}/_ssgManifest.js
RENAMED
|
File without changes
|