Skip to content

Stop leaking SDK tarballs into binary-report in Source-Only validation - #6769

Merged
akoeplinger merged 1 commit into
mainfrom
fix/source-only-iba-rescan
May 22, 2026
Merged

akoeplinger merged 1 commit into
mainfrom
fix/source-only-iba-rescan

Conversation

@akoeplinger

Copy link
Copy Markdown
Member

Three download-artifacts.yml calls in source-build-and-validate.yml share the same pipeline artifact name, so $(Pipeline.Workspace)/<artifactName>/ accumulates files across calls.

download-artifacts.yml's CopyFiles used Contents: '**', which dragged SDK tar.gz files left by an earlier download into artifacts/log/Release/binary-report/ (via flattenDirs).

Those then got staged under BuildLogs/ and rescanned by 1ES PT's injected Binary Analysis Scan Optimization.

  • Filter CopyFiles by downloadFilePatterns so only requested files are copied.
  • Delete the staging folder after copy to free disk and prevent similar leaks.

Three download-artifacts.yml calls in source-build-and-validate.yml share the same pipeline artifact name, so `$(Pipeline.Workspace)/<artifactName>/` accumulates files across calls.

download-artifacts.yml's CopyFiles used `Contents: '**'`, which dragged SDK tar.gz files left by an earlier download into `artifacts/log/Release/binary-report/ `(via flattenDirs).

Those then got staged under BuildLogs/ and rescanned by 1ES PT's injected Binary Analysis Scan Optimization.

- Filter CopyFiles by downloadFilePatterns so only requested files are copied.
- Delete the staging folder after copy to free disk and prevent similar leaks.

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings May 22, 2026 11:42
@akoeplinger
akoeplinger requested review from a team as code owners May 22, 2026 11:42

Copilot AI 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.

Pull request overview

Updates the reusable download-artifacts.yml pipeline step to prevent unintended files from being copied when multiple downloads reuse the same pipeline artifact name/workspace folder during source-only validation.

Changes:

  • Restricts CopyFiles@2 to copy only the requested downloadFilePatterns instead of copying ** (everything).
  • Adds a cleanup step to delete downloaded files from $(Pipeline.Workspace)/<artifactName>/ after the copy completes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@akoeplinger

Copy link
Copy Markdown
Member Author

/backport to release/10.0.1xx

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/10.0.1xx (link to workflow run)

@akoeplinger

Copy link
Copy Markdown
Member Author

/backport to release/10.0.3xx

@akoeplinger

Copy link
Copy Markdown
Member Author

/backport to release/10.0.4xx

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/10.0.3xx (link to workflow run)

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/10.0.4xx (link to workflow run)

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