include --max-target-bytes as a whitelisted option for the Semgrep analyzer

Proposal

New feature request related to Semgrep scanning in GitLab CI.

Currently, only --max-memory is allowed. Some of our files can be larger than 1 MB so it would be important to have those scanned too.

Proposed solution: include --max-target-bytes as a whitelisted option for the Semgrep analyzer

Additional links :

Implementation Plan

  1. Update the allowedCliOpts in analyze.go to include --max-target-bytes.
  2. Add unit tests to analyze_test.go to test the change from step 1.
  3. Add an integration test to semgrep_image_spec.rb to test the change in step 1.
  4. Update the Security scanner configuration table to include documentation for the new flag added in step 1.
Edited by Adam Cohen