Skip to content

feat(analyze_org): add --exclude-repo flag to exclude repositories from org scan - #458

Merged
fproulx-boostsecurity merged 2 commits into
boostsecurityio:mainfrom
Tyagiquamar:feat-exclude-repo
Oct 9, 2026
Merged

fproulx-boostsecurity merged 2 commits into
boostsecurityio:mainfrom
Tyagiquamar:feat-exclude-repo

Conversation

@Tyagiquamar

Copy link
Copy Markdown
Contributor

Problem
When scanning large organizations with poutine analyze_org, users may want to exclude certain repositories from the scan, as requested in #394.

Root Cause / Context
analyze_org scanned all non-archived repositories in an organization without a mechanism to ignore specific repositories by name or identifier.

Fix

  • Added ExcludeRepos slice to models.Config with helper method IsRepoExcluded(repoIdentifier, repoName string) bool.
  • Added --exclude-repo / -e string slice flag to analyzeOrgCmd and bound it to viper configuration excludeRepos.
  • Added exclusion check in AnalyzeOrg before scheduling repository clones and scans, notifying obs.OnRepoSkipped(..., "excluded").

Regression Test

  • Added unit tests in models/config_test.go verifying case-insensitive repository identifier and repository name exclusion matching on Config.IsRepoExcluded.

Validation

  • go test -v ./models PASS (exit code 0)
  • docker run --rm -v ... golang:latest go test -v ./models PASS (exit code 0)

Fixes #394

@Tyagiquamar
Tyagiquamar requested a review from a team as a code owner October 7, 2026 19:44
…om org scan

Signed-off-by: Tyagiquamar <mohdquamartyagi@gmail.com>
@fproulx-boostsecurity

Copy link
Copy Markdown
Contributor

Thanks for the PR! Could you please make sure to run the linter. There is a lint error now https://github.com/boostsecurityio/poutine/actions/runs/37677264023/job/113490130650?pr=458#step:4:35

@Tyagiquamar

Copy link
Copy Markdown
Contributor Author

Fixed the errcheck linter finding in commit c4190c6 (_ = viper.BindPFlag("excludeRepos", analyzeOrgCmd.Flags().Lookup("exclude-repo"))). Verified with golangci-lint run ./cmd/... and go test -v ./models in Docker.

@fproulx-boostsecurity
fproulx-boostsecurity merged commit e7a41b7 into boostsecurityio:main Oct 9, 2026
4 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.

Exclude repo when performing org scan

2 participants