Skip to content

COR-2000: update default exlude globs - #175

Merged
leenk7991 merged 4 commits into
cursor/force-include-scan-rules-b1acfrom
cor-2000-scan-migrations
Sep 20, 2026
Merged

leenk7991 merged 4 commits into
cursor/force-include-scan-rules-b1acfrom
cor-2000-scan-migrations

Conversation

@leenk7991

@leenk7991 leenk7991 commented Sep 16, 2026

Copy link
Copy Markdown
Member

Description

Stop excluding **/migrations/** from the default zip globs so CLI uploads include migration paths. Fusion still decides whether those files are scanned (IGNORE_PATHS + project include rules).

Related Issues

COR-2000

Depends on Fusion + Doghouse COR-2000 (include rules / tighter migration globs). Deploy those first; otherwise uploaded migration files are still skipped.

Type of Change

  • Bug fix

Testing

  • Unit tests added/updated
  • Manual testing completed

Test Results:

  • GET /api/v1/scan-settings?project_name=<project> returns include_paths / ignore_paths for that project
  • No project include rule: migrations/ is in the zip, Fusion still skips it (file log: skipped)
  • Path with “migration” in the name (e.g. onetru-data-migration/) scans with no include rule
  • Project include **/migrations/** + corgea scan --project-name … --disable-incremental: migrations/0001_users.py scanned
  • Incremental after adding that include can hide the file (diffs an older baseline). --disable-incremental (or Doghouse latest-scan fallback) analyzes it
  • No project include: corgea scan --disable-incremental --include 'migrations/**' prints Force-including 1 file(s)… and scans the file
  • Project ignore + CLI --include: ignored file stays skipped (ignore wins). No CLI warning today
  • --include is only on corgea scan (this branch). Wrong binary: unexpected argument '--include' found

@leenk7991 leenk7991 added the wip label Sep 16, 2026
@corgea-security corgea-security added the dennis-reviewed Dennis completed an automated review label Sep 16, 2026

@corgea-security corgea-security 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.

Automated review risk: 2/5.

Low-risk configuration change that includes migration files in scanning. No actionable defect is provable from the supplied diff.

No critical or high-priority changes were found.

@corgea-security corgea-security 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.

Approved by Dennis: high policy risk and automated risk 2/5.

@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

The CLI slice for COR-2000 is the right one-line change: blast.rs zips with exclude_globs: None, so removing **/migrations/** is what actually puts migration paths in the upload. Fusion IGNORE_PATHS still skip them until include rules exist; --exclude remains the opt-in for the old zip.

The merge gap is that this behavior is untested. The unit test named in the PR body does not use DEFAULT_EXCLUDE_GLOBS and would still pass if the glob were put back. See inline — two assertions on the existing glob-set test pin it.

Verified, not blocking: only production caller; remaining default globs intact; incremental still uploads the whole archive; CLI-first rollout only adds ignored zip entries until Fusion/Doghouse include rules land.

Open in Web View Automation 

Sent by Cursor Automation: pr-flow

Comment thread src/utils/generic.rs

@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.

Prior finding is closed. ab8e1cc pins the COR-2000 behavior on default_exclude_globs_match_abs_tmp_but_not_repo_relative_paths with:

assert!(!set.is_match(Path::new("migrations/0001_initial.py")));
assert!(!set.is_match(Path::new("app/migrations/0001_initial.py")));

Those assertions fail if **/migrations/** is restored, and they use the same repo-relative path shape as create_zip_from_target (glob_set.is_match(&relative_path)).

No remaining merge blockers in this slice. Rechecked on ab8e1cc vs merge-base c6cd678:

  • Only DEFAULT_EXCLUDE_GLOBS in src/utils/generic.rs changed; blast.rs still zips with exclude_globs: None.
  • Incremental does not re-filter that list; the archive is still the whole project.
  • --exclude is still the opt-in for the old zip.
  • Remaining default globs are unchanged; **/tmp/** does not drop repo-relative migrations/.

Fusion IGNORE_PATHS + include rules still decide what gets scanned, as the PR body states. cargo test --lib could not be run here (crates.io time-core 0.1.8 needs edition2024 / newer cargo than this image's 1.83.0) — not a PR defect.

Open in Web View Automation 

Sent by Cursor Automation: pr-flow

@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
leenk7991 force-pushed the cor-2000-scan-migrations branch from ab8e1cc to b6837a0 Compare September 20, 2026 11:35
@leenk7991
leenk7991 changed the base branch from main to cursor/force-include-scan-rules-b1ac September 20, 2026 11:35
@leenk7991
leenk7991 merged commit ea211b6 into cursor/force-include-scan-rules-b1ac Sep 20, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dennis-reviewed Dennis completed an automated review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants