Open
Conversation
Adds CogniumReader, its unit test, and a two-row test fixture for the Cognium SAST tool (https://cognium.dev / https://github.com/cogniumhq/cognium). Cognium emits results via: cognium scan <path> --format owasp-benchmark --output results.csv The CSV format uses a single comment/header line followed by one row per positive detection: # test name,category,CWE,real vulnerability BenchmarkTest00001,cmdi,78,true CogniumReader reads the CWE directly from column 2, so no category-to-CWE lookup table is needed. The reader is registered in Reader.allReaders() and verified by CogniumReaderTest. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces the earlier CSV-based approach with a proper SARIF reader. Cognium already outputs standard SARIF via --format sarif, so no new output format is needed in the tool itself. CogniumReader extends SarifReader with CweSourceType.CUSTOM, providing a static ruleId-to-CWE mapping for the 13 security sink types Cognium detects. Non-security findings (reliability, performance, etc.) have no mapping entry and are silently skipped by the base class. To generate results: cognium scan BenchmarkJava/src/ --format sarif --output Cognium.sarif Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds scorecard support for Cognium (https://github.com/cogniumhq/cognium),
an open-source SAST tool. No new output format needed — Cognium's existing
--format sarif output is consumed directly.
Generate results:
cognium scan BenchmarkJava/src/ --format sarif --output Cognium.sarif
Changes:
CweSourceType.CUSTOM; static ruleId→CWE map for 13 security sink types;
non-security findings skipped by base class