Surface --repo-id as the primary dispatch path (mark --project legacy)#10
Open
joshkotrous wants to merge 2 commits into
Open
Surface --repo-id as the primary dispatch path (mark --project legacy)#10joshkotrous wants to merge 2 commits into
joshkotrous wants to merge 2 commits into
Conversation
…ject legacy The CLI already sends repoId (auto-detected from GITHUB_REPOSITORY_ID) and the console now uses it to scope a pentest to one repository's applications. Update the --repo-id/--project help text and the dispatch error messages to lead with repo-id and flag projectId as the legacy workspace-wide path. No behavior change to the request body (still accepts either). Co-authored-by: josh <josh@pensarai.com>
…legacy Co-authored-by: josh <josh@pensarai.com>
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.
Summary
Companion to the console change that restores per-repo scoping for CI-triggered pentests (
pensarai/console#1773). The CLI was already functionally compatible — it sendsrepoId(auto-detected fromGITHUB_REPOSITORY_ID) and readsissueCountsBySeverity— but its help text, error messages, and README only documented the deprecated--projectpath. The console now usesrepoIdto scope a pentest to a single repository's applications, so the CLI's guidance should lead with--repo-id.Changes (non-breaking)
src/bin/index.ts— list--repo-idfirst and describe it as the per-repo scoping path; relabel--projectas legacy and point users to--repo-id.src/lib/ci.ts— reword the two "no identifier" errors to lead withrepoId/GITHUB_REPOSITORY_ID;projectIdis still accepted.README.md— document--repo-id/GITHUB_REPOSITORY_ID; mark--project/PENSAR_PROJECT_IDlegacy.No request-body or runtime behavior change:
dispatchScanstill serializesprojectIdorrepoIdexactly as before, so existing pipelines (including any pointed at production) keep working.projectIdremains accepted because the project concept is only deprecated on the newer console, not removed across all environments.Test Plan
npm run build(tsc) passes.pensar pentest --repo-id <id> -e stagingand confirm the scan is scoped to that repo's applications.