Skip to content

feat: add local scanning CLI and dashboard v2 - #44

Closed
kartikk-k wants to merge 2 commits into
mainfrom
v2
Closed

kartikk-k wants to merge 2 commits into
mainfrom
v2

Conversation

@kartikk-k

Copy link
Copy Markdown
Collaborator

No description provided.

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 0/5

[High impact] The PR replaces the product's main scanning, provider, storage, and dashboard workflows.

Do not merge yet: scan errors are hidden by default, and earlier findings about lost notes, private workspace files, and skipped source remain open.

Fix All in CodexFindings

  1. P1 Failed scans hide their reason ▶
  2. P1 Failed reads can erase notes ▶
  3. P1 Security Workspace files leave the machine ▶
  4. P1 Nested ignore overrides are lost ▶
  5. P2 Different projects share one group ▶
Fix with agent prompt
### Issue 1
web/src/pages/ScanDetail.tsx:383
`ScanDetail` now always opens on Findings, but `scan.error` appears only under Progress. Opening a failed or partial scan with zero findings shows “This scan didn't report any vulnerabilities” without explaining that the review failed or stopped early. Users must discover the Progress tab to learn what went wrong.

Previously, these scans opened on Progress and showed the reason. Show `scan.error` outside the tabs, or keep Progress as the default for incomplete scans.

### Issue 2
web/src/pages/ScanDetail.tsx:287-298
`useScanFindings` turns a failed fetch into editable records with `status: "open"` and `note: ""`. A temporary connection failure or server error can make a resolved finding with saved notes look new. Saving the form sends both invented values back, reopening the finding or erasing its notes.

Keep the last successful records, show the error, and block edits until the saved state is loaded.

### Issue 3
src/harness/project.ts:65-69
`inventory` excludes directories named `.openhack`, not the actual workspace path. If a user scans `/project` with `--home /project/local-data`, the scan includes `dashboard-4900.json` and saved reports there. These can contain the private shutdown token and source from other projects, which then go to the selected provider.

The scan also includes its own report. Later report writes make an unchanged project fail the saved-source check on resume. Pass the workspace path into source collection and exclude it before walking files.

**How this was verified:** A custom workspace inside the scan root passes the file filters, its dashboard record contains the private token, and collected JSON is included in provider prompts.

### Issue 4
src/harness/project.ts:undefined-66
`rules.some(...)` makes every earlier exclusion permanent. For example, a root `.gitignore` containing `*.ts` and `src/.gitignore` containing `!keep.ts` should include `src/keep.ts`. The parent matcher still returns true here, so the scanner silently skips that file and can report complete coverage without reviewing it.

Apply the rules in order so later rules can override earlier ones.

### Issue 5
web/src/components/FindingsInbox.tsx:164-173
Project groups and filters use `project`, which is only `basename(root)`. Scanning `/work/frontend` and `/archive/frontend` merges both into one group and one filter option. The group's tooltip shows only the first directory, so users cannot tell the projects apart or filter them separately.

Use `root` as the group and filter value, with the short project name as its label.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

This PR replaces the Python application with a local Bun CLI and React dashboard. The latest changes add an overview page, onboarding, native folder browsing, and revised scan views.

  • The OpenHack CLI scans project folders and saves reports for later.
  • The local dashboard shows scans and findings from the shared workspace.
  • Scans can use API keys or existing Codex and Claude Code logins.
  • The previous Python and terminal-interface product is removed.

Reviews (2) · Last reviewed commit: "feat: refine local dashboard and scan wo..." · Reviewed by Greptile

Comment thread web/src/pages/ScansPage.tsx Resolved
Comment on lines +293 to +304
.catch(() => {
if (!signal.aborted)
setRecords(
scan.findings.map((finding) => ({
...finding,
key: `${scan.id}:${finding.id}`,
scanId: scan.id,
project: scan.project,
root: scan.root,
status: "open",
note: "",
updatedAt: scan.startedAt,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Failed reads can erase notes

useScanFindings turns a failed fetch into editable records with status: "open" and note: "". A temporary connection failure or server error can make a resolved finding with saved notes look new. Saving the form sends both invented values back, reopening the finding or erasing its notes.

Keep the last successful records, show the error, and block edits until the saved state is loaded.

Prompt To Fix With AI
This is a comment left during a code review.
Path: web/src/pages/ScanDetail.tsx
Line: 293-304

Comment:
**Failed reads can erase notes**

`useScanFindings` turns a failed fetch into editable records with `status: "open"` and `note: ""`. A temporary connection failure or server error can make a resolved finding with saved notes look new. Saving the form sends both invented values back, reopening the finding or erasing its notes.

Keep the last successful records, show the error, and block edits until the saved state is loaded.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex Fix in Claude Code Fix in Cursor Fix in Conductor

Comment thread src/harness/project.ts
Comment on lines +65 to +69
const full = resolve(dir, entry.name), name = relative(root, full).split(sep).join("/");
if (entry.isSymbolicLink() || excludedDirs.has(entry.name) || secretName.test(entry.name) || secretExt.test(entry.name) || lockName.test(entry.name) || /\.min\.[cm]?js$/i.test(entry.name) || rules.some(r => r.matcher.ignores(relative(r.dir, full).split(sep).join("/") + (entry.isDirectory() ? "/" : "")))) {
project.skipped++; continue;
}
if (entry.isDirectory()) { await walk(full, rules, depth + 1); continue; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 security Workspace files leave the machine

inventory excludes directories named .openhack, not the actual workspace path. If a user scans /project with --home /project/local-data, the scan includes dashboard-4900.json and saved reports there. These can contain the private shutdown token and source from other projects, which then go to the selected provider.

The scan also includes its own report. Later report writes make an unchanged project fail the saved-source check on resume. Pass the workspace path into source collection and exclude it before walking files.

How this was verified: A custom workspace inside the scan root passes the file filters, its dashboard record contains the private token, and collected JSON is included in provider prompts.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/harness/project.ts
Line: 65-69

Comment:
**Workspace files leave the machine**

`inventory` excludes directories named `.openhack`, not the actual workspace path. If a user scans `/project` with `--home /project/local-data`, the scan includes `dashboard-4900.json` and saved reports there. These can contain the private shutdown token and source from other projects, which then go to the selected provider.

The scan also includes its own report. Later report writes make an unchanged project fail the saved-source check on resume. Pass the workspace path into source collection and exclude it before walking files.

**How this was verified:** A custom workspace inside the scan root passes the file filters, its dashboard record contains the private token, and collected JSON is included in provider prompts.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex Fix in Claude Code Fix in Cursor Fix in Conductor

Comment thread src/harness/project.ts
for (const entry of entries) {
signal?.throwIfAborted();
const full = resolve(dir, entry.name), name = relative(root, full).split(sep).join("/");
if (entry.isSymbolicLink() || excludedDirs.has(entry.name) || secretName.test(entry.name) || secretExt.test(entry.name) || lockName.test(entry.name) || /\.min\.[cm]?js$/i.test(entry.name) || rules.some(r => r.matcher.ignores(relative(r.dir, full).split(sep).join("/") + (entry.isDirectory() ? "/" : "")))) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Nested ignore overrides are lost

rules.some(...) makes every earlier exclusion permanent. For example, a root .gitignore containing *.ts and src/.gitignore containing !keep.ts should include src/keep.ts. The parent matcher still returns true here, so the scanner silently skips that file and can report complete coverage without reviewing it.

Apply the rules in order so later rules can override earlier ones.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/harness/project.ts
Line: 66

Comment:
**Nested ignore overrides are lost**

`rules.some(...)` makes every earlier exclusion permanent. For example, a root `.gitignore` containing `*.ts` and `src/.gitignore` containing `!keep.ts` should include `src/keep.ts`. The parent matcher still returns true here, so the scanner silently skips that file and can report complete coverage without reviewing it.

Apply the rules in order so later rules can override earlier ones.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex Fix in Claude Code Fix in Cursor Fix in Conductor

Comment on lines +159 to +168
const key = groupBy === "project" ? finding.project : finding.severity;
const group = byKey.get(key) ?? {
key,
label:
groupBy === "project"
? finding.project
: finding.severity.charAt(0).toUpperCase() +
finding.severity.slice(1),
root: finding.root,
rows: [],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Different projects share one group

Project groups and filters use project, which is only basename(root). Scanning /work/frontend and /archive/frontend merges both into one group and one filter option. The group's tooltip shows only the first directory, so users cannot tell the projects apart or filter them separately.

Use root as the group and filter value, with the short project name as its label.

Prompt To Fix With AI
This is a comment left during a code review.
Path: web/src/components/FindingsInbox.tsx
Line: 159-168

Comment:
**Different projects share one group**

Project groups and filters use `project`, which is only `basename(root)`. Scanning `/work/frontend` and `/archive/frontend` merges both into one group and one filter option. The group's tooltip shows only the first directory, so users cannot tell the projects apart or filter them separately.

Use `root` as the group and filter value, with the short project name as its label.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex Fix in Claude Code Fix in Cursor Fix in Conductor

@kartikk-k kartikk-k closed this Nov 23, 2026
? []
: (records ?? []).filter((f) => f.validation !== "rejected");
const open = listed.filter((f) => f.status === "open");
const [view, setView] = useState<"findings" | "overview">("findings");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Failed scans hide their reason

ScanDetail now always opens on Findings, but scan.error appears only under Progress. Opening a failed or partial scan with zero findings shows “This scan didn't report any vulnerabilities” without explaining that the review failed or stopped early. Users must discover the Progress tab to learn what went wrong.

Previously, these scans opened on Progress and showed the reason. Show scan.error outside the tabs, or keep Progress as the default for incomplete scans.

Prompt To Fix With AI
This is a comment left during a code review.
Path: web/src/pages/ScanDetail.tsx
Line: 383

Comment:
**Failed scans hide their reason**

`ScanDetail` now always opens on Findings, but `scan.error` appears only under Progress. Opening a failed or partial scan with zero findings shows “This scan didn't report any vulnerabilities” without explaining that the review failed or stopped early. Users must discover the Progress tab to learn what went wrong.

Previously, these scans opened on Progress and showed the reason. Show `scan.error` outside the tabs, or keep Progress as the default for incomplete scans.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex Fix in Claude Code Fix in Cursor Fix in Conductor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant