Skip to content

feat: add acceptance tests for secrets ignore output [PS-669]#6832

Draft
alexandru-manea-snyk wants to merge 1 commit into
mainfrom
feat/PS-669/acceptance-tests-secrets-with-ignores
Draft

feat: add acceptance tests for secrets ignore output [PS-669]#6832
alexandru-manea-snyk wants to merge 1 commit into
mainfrom
feat/PS-669/acceptance-tests-secrets-with-ignores

Conversation

@alexandru-manea-snyk
Copy link
Copy Markdown
Contributor

@alexandru-manea-snyk alexandru-manea-snyk commented May 22, 2026

Pull Request Submission Checklist

  • Follows CONTRIBUTING guidelines
  • Commit messages
    are release-note ready, emphasizing
    what was changed, not how.
  • Includes detailed description of changes
  • Contains risk assessment (Low | Medium | High)
  • Highlights breaking API changes (if applicable)
  • Links to automated tests covering new functionality
  • Includes manual testing instructions (if necessary)
  • Updates relevant GitBook documentation (PR link: ___)
  • Includes product update to be announced in the next stable release notes

What does this PR do?

This PR adds acceptance tests for secrets ignore output in both human-readable and SARIF formats.

Where should the reviewer start?

  • test/jest/acceptance/snyk-secrets/snyk-secrets-test-user-journey.spec.ts: the new describe('with ignored issues') block and the checkSarif helper.

How should this be manually tested?

What's the product update that needs to be communicated to CLI users?

N/A

Risk assessment (Low | Medium | High)?

Low - extends the existing test suite for secrets.

Any background context you want to provide?

This change implements the follow-up testing strategy from #6803. By ignoring select secrets findings at the org level, the tests can now successfully validate against those expected ignored issues.

What are the relevant tickets?

Screenshots (if appropriate)

N/A

@snyk-io
Copy link
Copy Markdown

snyk-io Bot commented May 22, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@alexandru-manea-snyk alexandru-manea-snyk force-pushed the feat/PS-669/acceptance-tests-secrets-with-ignores branch 2 times, most recently from 52e6625 to e5aaa08 Compare May 22, 2026 12:30
@alexandru-manea-snyk alexandru-manea-snyk force-pushed the feat/PS-669/acceptance-tests-secrets-with-ignores branch from e5aaa08 to c11dc55 Compare May 22, 2026 14:15
});
});

it('omits ignored findings by default', async () => {
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.

SARIF includes all the issues by default (thus ignores are always presented), only human-readable makes use of --include-ignores


describe('with ignored issues', () => {
// The folder below provides enough varied findings to ignore
const ignoresScanPath = `${TEMP_LOCAL_PATH}/semgrep-rules-examples`;
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.

suggestion: I think this might actually not behave as expected from my local testing: I think this gets evaluated before the beforeAll and causes the tests to fail, so I think it might be better to just compute the path in the command lines:

secrets test `${TEMP_LOCAL_PATH}/semgrep-rules-examples` --include-ignores

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.

2 participants