Repository navigation
feat(core-contracts): audit levels definition (quick, surface, full) - #602
Conversation
…, full) Signed-off-by: Nik Cubrilovic <[email protected]>
… a snapshot reader for audit levels AUDIT_SETTING_COPY names each setting, crawlStrategyCoverageMode maps a crawl strategy to the crawler's coverage mode, parseResolvedAuditSettings reads a stored snapshot back without trusting it. AuditReport gains an optional auditLevel snapshot and CoverageMode is now the AuditLevel type (same three words). Additive: nothing stamps auditLevel yet. Signed-off-by: Nik Cubrilovic <[email protected]>
|
Reviewed the diff for #602. It's additive and well tested. I found nothing that should block merge, only a few smaller points.
Security: the parser treats stored snapshots as untrusted and only returns the module's own strings, and the XSS-style test covers that. The |
… pages Signed-off-by: Nik Cubrilovic <[email protected]>
|
Review of #602 (audit levels definition). I read the diff and checked that
|
…napshot's level is as stored Signed-off-by: Nik Cubrilovic <[email protected]>
|
Review triage:
|
|
Reviewed the diff. This is additive, well documented and well tested. No blocking problems found. Notes:
Test coverage is good: preset pinning, clamping, the untrusted-snapshot parser, and the NaN and Infinity limit cases. I did not run the tests or |
* origin/main: feat(core-contracts): audit levels definition (quick, surface, full) (#602) test(rules): restore the real fetch when a graphql test stubs twice (#599) chore(release): v0.0.107 (#595) docs(changelog): release notes for v0.0.107 (#594) feat(rules): add GraphQL introspection and GET mutation probing rules (#593) fix(audit-engine): keep paid cloud prefetch results when the phase is abandoned (#582)
The shared audit levels definition, on its own, so the cloud dashboard can build on it before the CLI change in #598 lands.
What this adds
@squirrelscan/core-contracts/audit-levels(new subpath export): the three levels (quick,surface,full) pluscustom, each level's preset settings (pages, crawl strategy, cloud checks, rendering, external link checks, probing),AUDIT_LEVEL_COPYandAUDIT_SETTING_COPY(the words surfaces show),resolveAuditSettings/levelOfSettings(a level plus edits, with "based on X, N changes"), plan and balance clamping (effectiveAuditSettings), the cloud's old four depths as legacy aliases (legacyCloudDepthSettings),crawlStrategyCoverageMode, andparseResolvedAuditSettings(reads a stored snapshot back without trusting it).AuditReport.auditLevel?: ResolvedAuditSettings, optional; nothing stamps it yet.CoverageModeis now theAuditLeveltype: the same three words, so no caller changes.Additive only: no CLI, engine, report or docs behaviour changes. The
--levelflag, the docs page and the CHANGELOG entry stay in #598, which will rebase onto this.Checks
tsgo --noEmitinpackages/core-contracts,apps/cliandpackages/report: clean.bun test packages/core-contracts/tests/audit-levels.test.ts: 29 pass.Docs: none (no user-facing change). Skill: no change.