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

Create reports under Build Artifacts(AST-64900) #340

Merged
merged 8 commits into from
Nov 7, 2024

Conversation

sarahCx
Copy link
Collaborator

@sarahCx sarahCx commented Nov 5, 2024

Saving the report files generated under Build Artifacts to allow easy access.

Testing:
Added an integration test that builds a job and runs a scan with report generation parameters, checking whether the expected files are present in the archive.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@@ -356,6 +356,31 @@ public void close() throws IOException {
ArtifactArchiver artifactArchiverJson = new ArtifactArchiver(workspace.toURI().relativize(jsonReportFilePath.toURI()).toString());
artifactArchiverJson.perform(run, workspace, envVars, launcher, listener);

if (scanConfig.getAdditionalOptions().contains("--report-format")) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe set it in another private method with a name that will describe what you ar doing here

@@ -103,6 +110,39 @@ public void failWrongCheckmarxInstallation() throws Exception {
this.jenkins.assertBuildStatus(Result.FAILURE, build);
this.jenkins.assertLogContains("Please configure the build properly and retry.", build);
}
@Test
public void successCheckmarxScanAndVerifyArtifacts() throws Exception {
Copy link
Collaborator

Choose a reason for hiding this comment

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

please update ethe test name inder when_given_then(should) concentration and have comments of the steps cause it's hard to understand what it does

Copy link
Contributor

github-actions bot commented Nov 6, 2024

Logo
Checkmarx One – Scan Summary & Details4989de18-da6a-457f-bcf4-b31a5cc56fa8

Policy Management Violations

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

Fixed Issues

Severity Issue Source File / Package
MEDIUM Unpinned Actions Full Length Commit SHA /ci.yml: 40
MEDIUM Unpinned Actions Full Length Commit SHA /manual-tag.yml: 23
MEDIUM Unpinned Actions Full Length Commit SHA /release.yml: 42
MEDIUM Unpinned Actions Full Length Commit SHA /release.yml: 53
MEDIUM Unpinned Actions Full Length Commit SHA /cd.yml: 24
MEDIUM Unpinned Actions Full Length Commit SHA /cd.yml: 17
MEDIUM Unpinned Actions Full Length Commit SHA /cd.yml: 55
MEDIUM Unpinned Actions Full Length Commit SHA /cd.yml: 34

@OrShamirCM OrShamirCM merged commit fbef9b8 into main Nov 7, 2024
15 of 16 checks passed
@OrShamirCM OrShamirCM deleted the bug/addReportsToArtifact branch November 7, 2024 15:17
@sarahCx sarahCx added the bug Something isn't working label Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants