Git Product home page Git Product logo

Comments (6)

github-actions avatar github-actions commented on July 21, 2024

Internal Jira issue: AST-29883

from ast-cli.

jbrotsos avatar jbrotsos commented on July 21, 2024

@MAP4H have you tried --report-format json

(https://checkmarx.com/resource/documents/en/34965-68640-results.html#UUID-2e5e64d2-bf90-43b3-e86f-e12632b27303_N6493038a4a066)

from ast-cli.

MAP4H avatar MAP4H commented on July 21, 2024

@MAP4H have you tried --report-format json

(https://checkmarx.com/resource/documents/en/34965-68640-results.html#UUID-2e5e64d2-bf90-43b3-e86f-e12632b27303_N6493038a4a066)

My problem is not the format, by default i get .json format file, what i need is to get only the SAST result, but i don't see any filter to perform this action for a json format

This is what says in the documentation:

--report-pdf-options (Default: All Sections)
Specify the sections that will be included in the pdf format report.

This flag can only be used when --report-format is set as pdf.

Available sections are: Sast, Sca, Iac-Security, Api-Security, ScanSummary, ExecutiveSummary, and ScanResults.

ScanResults includes results for all scanners (IaC-Security, Sast and Sca).

from ast-cli.

jbrotsos avatar jbrotsos commented on July 21, 2024

@MAP4H can you filter the json results to only look at SAST engine results?

from ast-cli.

logan5735 avatar logan5735 commented on July 21, 2024

@MAP4H I am using as scripted pipeline approach to run scans. This may not pertain to your approach. However, I send my output to a temporary output file, and I can then parse it for key patterns with regex.

sh(returnStatus: true, script: "CX1CMDSCRIPT > output.txt")
def output = readFile('output.txt').trim()
def scanidValue= sh(returnStdout: true, script: '''grep -Po "(^|\s)Scan ID:\s\K[^,]+" output.txt''')

from ast-cli.

pedrompflopes avatar pedrompflopes commented on July 21, 2024

Hi @logan5735

I understand that you run ast-cli in a pipeline and you want to update the just the sast results. I suggest you add these options to your scan create command:

./cx scan create --report-format json --output-name myreport.json
cat myreport.json | jq '.results[] | select(.type == "sast")'

Thanks.

from ast-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.