By submitting a PR to this repository, you agree to the terms within the Checkmarx Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.
Description
File Removal Logic: Added _ = os.Remove(scaFile.Name()) at the end of the function to ensure the temporary file created by ioutil.TempFile is deleted after the scan completes.
Unit Test (TestRunScaResolverFileCleanup)
Mock Setup: Defined mock values for sourceDir, scaResolver, and projectName.
Function Execution: Called runScaResolver with the mock inputs.
File Deletion Check: Verified that the temporary file was deleted using os.Stat and os.IsNotExist, ensuring that the cleanup process worked as expected.
Please include any manual steps for testing end-to-end or functionality not covered by unit/integration tests.
Checklist
[ ] I have added documentation for new/changed functionality in this PR (if applicable).
[ ] I have updated the CLI help for new/changed functionality in this PR (if applicable).
[ ] All active GitHub checks for tests, formatting, and security are passing
…lver
By submitting a PR to this repository, you agree to the terms within the Checkmarx Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.
Description
References
Testing
Checklist