Skip to content

Added sca resolver sbom first integration tests into their own CI matrix group(AST-159215) - #1541

Open
cx-sumit-morchhale wants to merge 8 commits into
mainfrom
other/AST-159215-scaResolver-integrationTest
Open

Added sca resolver sbom first integration tests into their own CI matrix group(AST-159215)#1541
cx-sumit-morchhale wants to merge 8 commits into
mainfrom
other/AST-159215-scaResolver-integrationTest

Conversation

@cx-sumit-morchhale

Copy link
Copy Markdown
Contributor

Summary

  • Adds end-to-end and SBOM/no-scan-combination integration tests for the --sca-resolver flow (test/integration/sca_resolver_test.go).
  • Renamed those 5 tests to a unique TestIntegrationScaResolver* prefix and added a dedicated SCA Resolver matrix group in ci-tests.yml so they no longer get swept into the heavy "Scan Creation" group (they previously matched its TestCreateScan pattern by accident, adding the real ~114MB ScaResolver download + real scans to that group's runtime).
  • Fixed a pre-existing compile error: osinstaller.InstallOrUpgrade was missing its required ascaWrapper argument, which broke the test/integration package build under -tags integration.

Test plan

  • go vet -tags integration ./test/integration/... passes for sca_resolver_test.go
  • Confirmed the new TestIntegrationScaResolver pattern doesn't collide with any other matrix group's -run token (TestCreateScan, TestScaResolver, etc.)
  • Coverage for the new group is picked up automatically by the existing merge-coverage job (globs coverage-* artifacts)
  • CI integration test run (SCA Resolver matrix group) passes on this PR

cx-sumit-morchhale and others added 3 commits August 18, 2026 18:24
Download the real ScaResolver executable once (sync.Once, isolated
working dir) and share it across tests, then clean it up as the last
test in the file, so the ~114MB binary is fetched a single time per
run instead of per test. Covers a successful --sca-resolver run
(asserting the resolver's own success log line) and the --no-scan
without --sbom-first validation error.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Cover --no-scan + --sbom-first at the default location, --no-scan
with custom --sbom-output-path/--sbom-output-name, --sbom-first
without --no-scan (scan still submitted), and the --no-scan-without
--sbom-first validation error, all using the real downloaded
ScaResolver executable. Drop the end-of-file cleanup test in favor
of letting the cached executable persist across runs, matching how
the sca-realtime tests already handle their own download cache.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…matrix group

The 5 sca-resolver tests in sca_resolver_test.go were being swept into the
heavy "Scan Creation" matrix group because their names started with
TestCreateScan*, adding the real ~114MB ScaResolver download and real scans
to that group's already-long runtime. Renamed them to a unique
TestIntegrationScaResolver* prefix and added a dedicated "SCA Resolver"
matrix group so they run once, in parallel with the rest, with their own
coverage profile picked up by the existing merge-coverage job.

Also fixes a pre-existing compile error: osinstaller.InstallOrUpgrade was
missing its required ascaWrapper argument, which broke the entire
test/integration package build under -tags integration.
@stepsecurity-app

stepsecurity-app Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Resolved — a later workflow run passed this policy check.

Original alert (resolved)

Security Policy Alert: Secret Policy Violation

This workflow run has been blocked by StepSecurity's secrets policy because it accesses secrets and the workflow file differs from the default branch.

Secret references detected:

  • secrets.CX_BASE_URI at line 212
  • secrets.CX_CLIENT_ID at line 213
  • secrets.CX_CLIENT_SECRET at line 214
  • secrets.CX_BASE_AUTH_URI at line 215
  • secrets.CX_AST_USERNAME at line 216
  • secrets.CX_AST_PASSWORD at line 217
  • secrets.CX_APIKEY at line 218
  • secrets.CX_TENANT at line 219
  • secrets.CX_SCAN_SSH_KEY at line 220
  • secrets.PERSONAL_ACCESS_TOKEN at line 222
  • secrets.PROXY_USER at line 225
  • secrets.PROXY_PASSWORD at line 226
  • secrets.PR_GITLAB_TOKEN at line 231
  • secrets.PR_GITLAB_NAMESPACE at line 232
  • secrets.PR_GITLAB_REPO_NAME at line 233
  • secrets.PR_GITLAB_PROJECT_ID at line 234
  • secrets.PR_GITLAB_IID at line 235
  • secrets.AZURE_ORG at line 236
  • secrets.AZURE_PROJECT at line 237
  • secrets.AZURE_REPOS at line 238
  • secrets.AZURE_TOKEN at line 239
  • secrets.BITBUCKET_WORKSPACE at line 241
  • secrets.BITBUCKET_REPOS at line 242
  • secrets.BITBUCKET_USERNAME at line 243
  • secrets.BITBUCKET_PASSWORD at line 244
  • secrets.GITLAB_TOKEN at line 245
  • secrets.PR_BITBUCKET_TOKEN at line 247
  • secrets.ECHO_LIBRARIES_ACCESS_KEY at line 272
  • secrets.MS_TEAMS_WEBHOOK_URL_INTEGRATION_TESTS at line 420

To approve this workflow, please add the workflows-approved label to this PR.

Note: The label must be added by someone other than the PR author (cx-sumit-morchhale) or automation bots to ensure proper security review.

After the label is added, you can re-run the blocked workflow to proceed.

This workflow will be automatically approved once merged into the default branch.

For more information, see StepSecurity's Secret Exfiltration Policy documentation.

@cx-sumit-morchhale cx-sumit-morchhale changed the title AST-159215: Isolate sca-resolver integration tests into their own CI matrix group Added sca resolver sbom first integration tests into their own CI matrix group(AST-159215) Aug 18, 2026
These tests only need SCA results to assert on ScaResolver behavior.
Removing iac-security cuts one engine out of the synchronous scan wait,
reducing the chance of the 5-minute test context deadline being hit.
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants