Repository navigation
Deep audit fixes: finding sheet, inline errors, honest grades, exports, error states - #6
Merged
Merged
Conversation
Relative, missing, file and unreadable paths now return 400 INVALID_PATH with field=root_path and a sentence the user can act on instead of raw Go errors; quoted and ~ paths are accepted. The add-workspace dialog checks for relative paths before calling the API and shows any path error under the Folder path field (aria-invalid, focus kept) instead of a toast. Also: mux 404/405 for /api/ answer with the JSON error envelope, and bad JSON on settings/workspace create is INVALID_JSON.
…en in editor Below 100rem the docked column squeezed the findings table and, under 1250px, a position:relative override pushed the pane below every row (26k px down on a phone). The pane is now a right-edge drawer over the full-width table below 100rem and a near-full-height sheet over a dimmed list on phones; it docks beside the list only on very wide screens. Title, rule, message and fix come before the code, which scrolls with them, and an Open in editor (vscode://) link joins Copy location.
…up tools
Missing tools read as raw manifest jargon ('ruff: ruff: No pinned managed
artifact is configured.') repeated per tool and again as 'could not be
fully evaluated'. Scans now record 'Not installed on this computer. Set it
up from Tools.', the report drops the doubled id prefix and the duplicate
not-evaluated line, and the UI folds every not-installed wording (old
scans included) into one notice naming the tools with a single Set up
tools action: report banner, live timeline and workspace analyzer status.
The workspace analyzer list now opens with a one-line summary and folds
the per-analyzer rows into a disclosure.
…; reason required Suppressing or restoring a finding now recounts the workspace's finished scans so severity totals and the grade drop immediately. The findings page envelope carries status_counts (first page, page mode) so the Suppressed chip is real. The suppress dialog requires a reason (API stays optional).
…e comparisons GET /workspaces no longer runs a directory discovery per never-scanned workspace inside the request: languages come from a TTL cache warmed in the background (one walk at a time, also on create). Analyzer runs for every card load in one query, and finished scans' new/fixed counts are cached by (scan, previous scan) and dropped on suppression, scan or workspace changes.
…tion, provisional grade Every surface (scan header and stats, workspace risk card, analyzer status, dashboard badge, report foot) prints the same "X of Y analyzers ran" from lib/risk coverage helpers. Grades carry a sentence explaining the letter, its drivers and what the next grade needs, and partial coverage marks the grade provisional (dashed ring plus wording).
GET /findings/search now searches each workspace's newest completed scan unless scope=all is passed, so a finding that persisted across scans is one hit. The response echoes scope; the Search page adds an Include older scans toggle that round-trips through the URL.
Markdown opens with the grade, score, severity totals and the same
"X of Y analyzers ran" coverage line the app shows, and drops N/A metric
rows that only an analyzer that did not run could fill. The HTML report
gets a branded header with a grade tile (dashed when provisional) and the
coverage line. ?inline=1 serves report.md/.html/.sarif/.json for viewing
in a tab under a sandbox CSP; GET /scans/{id}/report.json aliases
findings.json. The export dialog adds JSON and an Open-in-new-tab link.
Analyzers run concurrently, so the headline no longer names whichever one
started last ("Pentest Suite is checking your code" over a list of four
running tools); it reads "Running analyzers · 1 of 3 finished · 1 needs
attention". The state badge says Running once analyzer events arrive
instead of the stale persisted Preparing, pills take each analyzer's latest
event so a failed tool no longer shows Running, and the event list uses
display names (Ruff, Gitleaks) like the rest of the page.
Compare lived only in each row's overflow menu. The history header now
offers "Compare latest two scans", the panel gets a Close action, and the
comparison names both scans with seconds and profile ("Comparing the Oct
31, 4:04:12 PM standard scan with the 4:04:48 PM deep scan") so two runs a
minute apart no longer read identical. The history detail row and row
tooltip show seconds too. The scan-completed notification names the
workspace and profile instead of a raw scan id prefix.
The Files panel and the global Rules page (custom analysis rules) both said "Rules". The panel is now "Include / exclude paths" with path-pattern wording on its controls, the nav item reads "Files & paths", the summary counts "saved path choices", and "1 languages" is pluralized correctly.
A09 (Security Logging and Monitoring Failures) carried a 'todo' hint, so every TODO/FIXME comment landed there and the row read 58% of findings. TODO-tracker and code-quality findings (maintainability, style, smells, complexity, duplication, performance) are no longer classified at all, percentages are of security-relevant findings, and hints match at word starts so 'auth' no longer fires on 'author'.
A tool that failed and found nothing showed a "Ruff 0" chip that read as "ran clean"; it is now left to the incomplete-analysis notice (tools that ran clean keep their 0). Synthesized finding titles split at the first "." anywhere, so "package.json declares GPL-3.0" became title "package" over "json declares GPL-3.0"; a clause now ends only at "."/":" before whitespace or the end.
- ErrorPanel: NOT_FOUND errors read 'Nothing here anymore', drop the pointless Try again and render page-specific way-back actions (scan, workspace, history, files pages). - Home: when the workspace list fails, hide the zero stat rail and show 'grade unavailable' instead of 'not graded yet'. - Phones: the search Columns panel can no longer overflow the viewport and the CLI tabs wrap instead of hiding the third tab off-screen.
Lower-case error strings (ST1005), drop unused test fixture fields (U1000), and document the platform-only SA4023 in the SonarQube credential loader (the non-Windows store stub always errors).
Add-workspace inline path error, phone finding sheet in view, suppression count round-trip, and latest-scan search dedup.
lib/features.ts hides, until they work: - the OWASP ZAP / Nuclei / Burp template-library tabs on Pentest, - the per-test Execute Check runner (the OWASP checks stay as a reference catalogue; scan matches live under Active Security Findings), - the Rules page (rail, palette; /rules now resolves to Page not found), - the workspace Dependencies insight tab. Copy no longer advertises them. Back-end code is untouched; flip a flag to bring a feature back. Tests and smoke cover the hidden state.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes from the second, deep (nested-page) audit. Focused commits, API stays backward compatible (
report.jsonis a new alias offindings.json;?inline=1is opt-in).Fixes
stat/getwdtext.scope=allkeeps the old behaviour).Not in this PR
server.gosplit and thestyles.cssconsolidation are deferred to a follow-up. They are large, purely structural diffs and would bury the behaviour changes above in review.Checks
go vet ./...passes;GOOS=windows go build ./...passes; staticcheck is clean for both GOOS.go test ./...: everything passes except the same 18 Linux-only analyzer tests that also fail onmain.go test -racepasses on api, database, scans, reports and tools (perf-budget tests skipped under race).tsc -b, vitest 578/578 andnpm run buildall pass.