Skip to content

Feat: add aibom test command#6643

Merged
sburuiana-snyk merged 1 commit intomainfrom
feat/aibom-test-command
Mar 17, 2026
Merged

Feat: add aibom test command#6643
sburuiana-snyk merged 1 commit intomainfrom
feat/aibom-test-command

Conversation

@sburuiana-snyk
Copy link
Contributor

@sburuiana-snyk sburuiana-snyk commented Mar 13, 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: here)
  • [?] Includes product update to be announced in the next stable release notes -- product knows about it, do I need them to have an update message that I attach to this PR?

What does this PR do?

Bumps up the cli-extension-aibom version to include the latest aibom test feature.
This feature was added in PR#56 and PR#57 in the extension, and is explained in those PR descriptions together with examples.

This PR also includes new tests for this feature.

Risk assessment (Low | Medium | High)?

I would say this is low, as it doesn't impact any existing CLI features.

Any background context you want to provide?

What are the relevant tickets?

AIBOM-16

Screenshots (if appropriate)

See the screenshots in the cli-extension-aibom PRs linked above.

@sburuiana-snyk sburuiana-snyk requested review from a team as code owners March 13, 2026 14:29
@snyk-io
Copy link

snyk-io bot commented Mar 13, 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.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@sburuiana-snyk sburuiana-snyk changed the title Feat/aibom test command Aibom test command Mar 16, 2026
@sburuiana-snyk sburuiana-snyk changed the title Aibom test command Add aibom test command Mar 16, 2026
@sburuiana-snyk sburuiana-snyk force-pushed the feat/aibom-test-command branch from 0a84d79 to ab55db1 Compare March 17, 2026 09:18
@snyk-pr-review-bot

This comment has been minimized.

@sburuiana-snyk sburuiana-snyk force-pushed the feat/aibom-test-command branch from ab55db1 to 2dce242 Compare March 17, 2026 09:45
@sburuiana-snyk sburuiana-snyk changed the title Add aibom test command Feat: add aibom test command Mar 17, 2026
@snyk-pr-review-bot

This comment has been minimized.

@sburuiana-snyk sburuiana-snyk force-pushed the feat/aibom-test-command branch from 2dce242 to a9f706f Compare March 17, 2026 11:12
@snyk-pr-review-bot

This comment has been minimized.

@sburuiana-snyk sburuiana-snyk force-pushed the feat/aibom-test-command branch from a9f706f to 241278d Compare March 17, 2026 12:51
@snyk-pr-review-bot

This comment has been minimized.

@sburuiana-snyk sburuiana-snyk force-pushed the feat/aibom-test-command branch from 241278d to 682acbb Compare March 17, 2026 13:33
@snyk-pr-review-bot

This comment has been minimized.

chore: add tests

chore: revert .md file changes (to be updated externally)

Made-with: Cursor
@sburuiana-snyk sburuiana-snyk force-pushed the feat/aibom-test-command branch from 682acbb to 2978044 Compare March 17, 2026 21:42
@snyk-pr-review-bot
Copy link

PR Reviewer Guide 🔍

🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Minor: Potential File Leak 🟡 [minor]

In the test 'aibom test with --json-file-output writes results to file', the temporary file created at outputPath is deleted using fs.unlinkSync(outputPath) at the end of the test. However, if any assertion (like expect(code).toEqual(1)) fails, the deletion line is skipped, leaving the temporary file on the filesystem. Consider using a try...finally block or a global afterEach hook to ensure the file is always cleaned up, or use a utility like createProject if applicable.

expect(result.data.attributes.issues[0].description).toEqual(
  'Disallowed model',
);
fs.unlinkSync(outputPath);
Minor: Inconsistent Import Style 🟡 [minor]

The test file uses a top-level import for the os module but uses a dynamic await import('fs') inside a test block. For consistency and performance (avoiding repeated imports if the test is modified or expanded), the fs module should be imported at the top of the file alongside os and path.

const fs = await import('fs');
📚 Repository Context Analyzed

This review considered 13 relevant code sections from 9 files (average relevance: 0.98)

@sburuiana-snyk sburuiana-snyk merged commit 707e5d4 into main Mar 17, 2026
9 checks passed
@sburuiana-snyk sburuiana-snyk deleted the feat/aibom-test-command branch March 17, 2026 23:59
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