Skip to content
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

Support SCS Vulnerabilities in json report when Agent is VSCode/AST-CLI (AST-63907) #850

Closed
wants to merge 9 commits into from

Conversation

sarahCx
Copy link
Contributor

@sarahCx sarahCx commented Aug 27, 2024

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

Added full support for SCS engine results when scanning from the CLI.
Added partial support (only Secret Detection results) when scanning is done from VS Code
No other case SCS results are supported

References

https://checkmarx.atlassian.net/browse/AST-63907

Testing

Adding unit tests to test the following scenarios:
Scan from CLI - expect to receive all SCS engine results.
Scan from VS Code - expect to get only Secret Detection results.
Scan from another engine - expect to get no results from the SCS engine.
Scan without results from SCS.
Scan with NULL results.

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
  • The correct base branch is being used

@OrShamirCM OrShamirCM requested a review from a team August 27, 2024 14:51
Copy link

github-actions bot commented Aug 27, 2024

Logo
Checkmarx One – Scan Summary & Details6ee35bbf-e25f-4fd6-93b9-cc56d24226bb

Policy Management Violations

Policy Name Rule(s) Break Build
[SAST-ML0] Not allowed NEW Sast vulnerabilities true

No New Or Fixed Issues Found

internal/commands/result.go Outdated Show resolved Hide resolved
internal/commands/result.go Outdated Show resolved Hide resolved
internal/commands/result.go Outdated Show resolved Hide resolved
internal/commands/result_test.go Outdated Show resolved Hide resolved
internal/commands/result_test.go Outdated Show resolved Hide resolved
internal/commands/result_test.go Outdated Show resolved Hide resolved
@AlvoBen
Copy link
Collaborator

AlvoBen commented Aug 27, 2024

Nice job!

# Extract names of failed tests and save them in the failedTests file
grep -E "^--- FAIL: " test_output.log | awk '{print $3}' > "$FAILED_TESTS_FILE"
-tags integration \
-v \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like you mergred it incorrectly. this file doesn't need any changes

@@ -28,6 +28,14 @@ func GetExportPackage(exportWrapper wrappers.ExportWrapper, scanID string) (*wra
payload := &wrappers.ExportRequestPayload{
ScanID: scanID,
FileFormat: "ScanReportJson",
ExportParameters: wrappers.ExportParameters{
HideDevAndTestDependencies: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

incorrectly merge

@@ -26,5 +26,5 @@ type ScaTypeCollection struct {
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in correctly mregre

Copy link
Contributor

@OrShamirCM OrShamirCM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last merge fro master is not good, the PR overwrite all master last changes.
Must fix.

Other than this, looks great!

@OrShamirCM OrShamirCM closed this Sep 3, 2024
sarahCx added a commit that referenced this pull request Sep 12, 2024
Support SCS Vulnerabilities in json report when Agent is VSCode/AST-CLI (AST-63907) #850
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.

3 participants