Skip to content

feat(COR-1639): surface scan git SHA in list output - #123

Merged
leenk7991 merged 14 commits into
mainfrom
cor-1639-scan-sha-tracking
Jul 22, 2026
Merged

feat(COR-1639): surface scan git SHA in list output#123
leenk7991 merged 14 commits into
mainfrom
cor-1639-scan-sha-tracking

Conversation

@leenk7991

@leenk7991 leenk7991 commented Jul 13, 2026

Copy link
Copy Markdown
Member

Summary

  • Add optional git_sha on ScanResponse (defaults when absent) so the CLI can show the commit SHA Doghouse stores for each scan.
  • Show SHA in corgea list table and --json output.
  • Resolve git SHA/branch via Repository::discover so scans started from a subdirectory still attribute correctly.
  • related doghouse PR: https://github.com/Corgea/doghouse/pull/1677

Test plan

  • ./harness check
  • Unit: ScanResponse deserializes git_sha and defaults when missing
  • Unit: get_repo_info from a nested subdirectory
  • Manual: corgea list / corgea list --json against an env that returns git_sha
  • Manual: run a scan from a repo subdirectory and confirm upload metadata still has SHA
Screenshot 2026-07-22 at 12 26 29 PM
Screenshot 2026-07-22 at 12 26 58 PM

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale comment

Comment thread src/main.rs Outdated
Comment thread src/scanners/blast.rs Outdated
leenk7991 and others added 2 commits July 13, 2026 12:31
Reject skip with partial-scan/output flags, case-insensitive complete status,
and satisfy clippy::question_mark on CI's Rust 1.97.

Co-authored-by: Cursor <cursoragent@cursor.com>
Address RUSTSEC-2026-0194/0195 (quick-xml >=0.41) and RUSTSEC-2026-0204
(crossbeam-epoch >=0.9.20). Update Fortify parser for the quick-xml 0.41 API.

Co-authored-by: Cursor <cursoragent@cursor.com>

@Ibrahimrahhal Ibrahimrahhal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what is the use case here? as this can be confusing --skip-if-scanned may skip scanning because the user is working tree head is already scanned but he have uncommitted changes

@leenk7991

Copy link
Copy Markdown
Member Author

what is the use case here? as this can be confusing --skip-if-scanned may skip scanning because the user is working tree head is already scanned but he have uncommitted changes

yes that's expected, they mentioned they want to skip the scan if the commite was already scanned in the past 24 hours, maybe for CI reruns?

- API/CLI capability to retrieve the last n scans, including their commit SHAs.

- Based on what is returned we will check if it has been scanned. If scanned within the last 24 hours, skip the scan. - TransUnion - Pending

@leenk7991
leenk7991 requested a review from Ibrahimrahhal July 15, 2026 14:31
Keep --skip-if-scanned helpers/tests alongside COR-1647 fail-on malicious
gates and COR-1576 wrapper/help UX updates from main.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread src/scanners/blast.rs Outdated
Comment thread src/scanners/blast.rs Outdated
Comment thread src/scanners/blast.rs Outdated
@leenk7991
leenk7991 requested a review from juangaitanv July 19, 2026 07:57
Comment thread src/scanners/blast.rs Outdated
Comment thread src/scanners/blast.rs Outdated
@Ibrahimrahhal

Ibrahimrahhal commented Jul 20, 2026

Copy link
Copy Markdown
Member

yes that's expected, they mentioned they want to skip the scan if the commite was already scanned in the past 24 hours, maybe for CI reruns?

Not sure, still looks not complete use case to me, for example we need to know how we should handle blocking rules. if they had a pipeline that was blocked on a day it will pass the next day if they enabled this flag. (it might not be needed but we need to understand more on how they intend to use it)

@leenk7991
leenk7991 requested a review from Ibrahimrahhal July 21, 2026 06:41
Comment thread src/scanners/blast.rs Outdated
Comment thread src/utils/generic.rs Outdated
@leenk7991
leenk7991 requested a review from juangaitanv July 21, 2026 11:23
Comment thread src/utils/generic.rs
Comment thread src/scanners/blast.rs Outdated
Comment thread src/scanners/blast.rs Outdated
@leenk7991
leenk7991 requested a review from juangaitanv July 21, 2026 12:51
Comment thread src/scanners/blast.rs Outdated
Comment thread src/utils/generic.rs Outdated
Comment thread src/scanners/blast.rs Outdated
leenk7991 and others added 2 commits July 22, 2026 12:24
Remove the opt-in skip path and unused list filters. Retain git_sha on
scan responses/list output, plus get_repo_info discover for subdirectory SHA.

Co-authored-by: Cursor <cursoragent@cursor.com>
@leenk7991 leenk7991 changed the title COR-1639: CLI-01: Scan Optimization (SHA Tracking) feat(COR-1639): surface scan git SHA in list output Jul 22, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@leenk7991
leenk7991 requested a review from juangaitanv July 22, 2026 09:28
@leenk7991
leenk7991 marked this pull request as draft July 22, 2026 09:28
@leenk7991
leenk7991 marked this pull request as ready for review July 22, 2026 09:28

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Production review of the post–--skip-if-scanned surface (SHA list column + Repository::discover in get_repo_info).

Blocking concern: switching get_repo_info from opendiscover changes BLAST project attribution for subdirectory CWDs while corgea list still keys off the CWD basename, so scans can land in one project and be invisible to list from the same directory. Related SHA/content mismatch called out inline.

Verified separately: ScanResponse.git_sha is additive with a missing-field default; --json will include it when present; prior skip-path review threads are obsolete after that feature was removed.

Open in Web View Automation 

Sent by Cursor Automation: pr-flow

Comment thread src/utils/generic.rs Outdated
Comment thread src/utils/generic.rs Outdated
Comment thread src/list.rs Outdated

@juangaitanv juangaitanv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

leenk7991 and others added 2 commits July 22, 2026 13:53
* COR-1641: CLI-02: Scan-Level Metadata Tagging

* COR-1641: serde skip if none

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
@leenk7991
leenk7991 merged commit bfa2ba5 into main Jul 22, 2026
16 checks passed
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.

3 participants