When I run a scan, the findings are printed out on the CLI. How can I see or store these results? I can use piping (|) or output redirection (>) - but is there a semgrep-y or formatted way of saving these findings?
How do I save or export reports/findings/results from Semgrep?
6k Views Asked by s-santillan At
1
There are 1 best solutions below
Related Questions in COMMAND-LINE-INTERFACE
- API key 401 error in .env.development file
- NPM Command Line Tool - Command not working
- How to pass the result of a computed property to another component in Vue
- Unexpected argument on sqlcmd command line
- Passing an argument to a file in linux
- Run multiple CLI commands inside ONE child process, but HANDLE each output separately in Node
- Ignoring folders in The Silver Searcher `ag`
- "Unable to load the service index for source https://api.nuget.org/v3/index.json " error when running pac install latest power shell in my local pc
- Values after flag parsed with first argument
- non-ASCII characters in CLI output in powershell script
- Creating aliases for Github Copilot CLI (ghcs, ghce not recognised)
- Setup for a CLI python program
- procedure/alias [a portion of] a somewhat long MySQL command?
- Is there a way to retrieve the version (git commit hash) of a provided tag on the provider side
- CLI can't recognize the "more" commands
Related Questions in LANGUAGE-AGNOSTIC
- Name for defining a function with fewer arguments that calls the original function
- Given a radius R, find the minimal number of circles to maximize the area where the circles' center belong to a set of points P
- How to get the previous index of an array (ring buffer way) in a clean way?
- Quicksort partition algorithm -- why is the swap with the pivot value outside of the loop?
- How to compute overlap time of two arrays of (price, time) elements
- Proper way to lru cache a read call for data that may or may not have been written at the time of the call
- Are concurrent non-atomic writes to never-read memory safe?
- How to apply the same operations to rows in a matrix to columns without code duplicaton?
- Want to match a string exactly, despite variants, and remove only that string
- goto statement in language standard
- How many permutations of an array when created into a number are divisible by 4 or 8?
- How many distinct digit permutations exist for a specific N-digit number?
- Why is there an error in this Dynamic Scoping example?
- What diff algorithm relies on finding the longest common prefix and suffix and cursing on the middle substring?
- How to determine if there are n consecutive pieces of the same color after every move?
Related Questions in SEMGREP
- Semgrep determine value of function parameter
- CWE-918 with Spring @Value parameters
- Download Full Semgrep Ruleset / Multiple rules in one file
- How do I find lines of code using semgrep CLI?
- How to ignore the semgrep check in this condition
- how to ignore a single rule globally with semgrep
- Load XSLT in Java code and parse it securely
- Enforcing dictionary access via .get(...) to prevent KeyErrors
- Semgrep: A scalable way of catching all cases in a multiline f-strings
- How to fix "SemgrepError Error while running rules: 0 bytes read on a total of 2 expected bytes" error for SemGrep analyzer?
- Need help to fix 'ensure that user-controlled variables in file paths are validated' semgrep scan issue
- SQL Injection with Semgrep/Spotbugs
- semgrep - any way to strip out terminal codes in its default output?
- Can SonarQube really detect memory leaks?
- regex matching duplicates in a comma separated list
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
After trying out some of the options in this CLI reference, I've been running the following command:
semgrep --config auto --output scan_results.json --json(Substitute the config option for whichever Semgrep config/rulesets you use.)
This results in a JSON file with the following top-level attributes:
Semgrep JSON formatting
Among the other formats supported, there's also support for SARIF output, which is used to streamline the interchange of results across different SAST tools. Similar to JSON, the structure is as follows:
semgrep --config auto --output scan_results.sarif --sarifCredit to Parsia on the Semgrep community slack for the SARIF tip.