-
Notifications
You must be signed in to change notification settings - Fork 54
Add SARIF output support for detect-cryptography command #517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add SARIF output support for detect-cryptography command #517
Conversation
|
@vamsipolavarapu-msft please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@microsoft-github-policy-service agree company="Microsoft" |
Added support for SARIF output for the detect-cryptography command
Copilot generated summary:
This pull request refactors and enhances the
DetectCryptographyToolto improve output formatting, error handling, and code maintainability. The main changes include the introduction of modular output generation for both text and SARIF formats, better handling of multiple targets, and updates to type usage for improved consistency. The changes are organized below by theme.Output Generation and Formatting Improvements:
GetTextResultsandGetSarifResultsto generate output in text and SARIF formats respectively, allowing for easier extension and maintenance. Output formatting now includes summaries of cryptographic implementations, library references, and other characteristics, with verbose output grouped by rule name. [1] [2] [3]AppendOutputto centralize output handling, and changed the workflow to print results once after all targets are processed rather than per target. [1] [2]Error Handling and Target Processing:
Type Consistency and Code Cleanup:
LocationtoAILocationfor cryptography detection results, ensuring consistency with the rules engine. [1] [2]Dependency and Namespace Management:
Constructor and Initialization Updates:
DetectCryptographyToolto allow for dependency injection and improved testability.Let me know if you want to go deeper into any of these changes or see how the new output methods work in practice!