Exclude non-shipping code from CG - #5132
Conversation
Ignore sample and test directories so Component Governance reports only dependencies relevant to shipping SDK code. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 900fd06f-19a5-4914-a9ca-8d9f6ee3b327
|
Azure Pipelines: Successfully started running 1 pipeline(s). 3 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
For context, we don't commit For now, I'm not excluding Another option considered and rejected was to build SBOMs for everything so that CG didn't fall back to CARGO_BUILD_SBOMS=true find samples/ -name Cargo.toml -execdir cargo +nightly -Z sbom build --all-features --lockedBut we have various test projects at different levels and no doubt would have more in the future and I don't want to start "littering" a bunch of partner projects (or even core) in a shared file. It's not scalable and would require frequent maintenance. |
There was a problem hiding this comment.
Pull request overview
Configures Component Governance to omit dependencies found in non-shipping sample and test directories.
Changes:
- Adds exclusion globs for root samples and nested test directories.
Show a summary per file
| File | Description |
|---|---|
eng/pipelines/templates/variables/globals.yml |
Adds Component Detection directory exclusions. |
Review details
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Balanced
|
/azp run rust - canary |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Move Component Governance source and directory exclusion settings onto the internal Pack job so the injected scan can actually see them. Remove the ineffective global exclusion from globals.yml while keeping the existing timeout and skip settings there. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 900fd06f-19a5-4914-a9ca-8d9f6ee3b327
|
/azp run rust - canary |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Another future possibility is to set the |

Ignore sample and test directories so Component Governance reports only dependencies relevant to shipping SDK code.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com
Copilot-Session: 900fd06f-19a5-4914-a9ca-8d9f6ee3b327