Skip to content

Commit b769b49

Browse files
Merge pull request #15 from codacy/add-requirements-to-docs
doc: Add requirements to run the tool to README.md
2 parents 0c24f75 + 9697fdd commit b769b49

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,23 @@ A standalone tool that converts gosec results to Codacy's format. It allows the
1717
1818
## Usage
1919

20-
The upload of results for a commit is done in two steps:
20+
### Requirements
2121

22-
- uploading all results
23-
- telling Codacy that it can run the rest of the analysis
22+
To get your gosec results into Codacy you'll need to:
2423

25-
For this a [project API](https://support.codacy.com/hc/en-us/articles/207994675-Project-API) token is required.
24+
- Enable the setting “Run analysis through build server” under your repository Settings > General > Repository analysis
25+
- Obtain a [Project API token](https://support.codacy.com/hc/en-us/articles/207994675-Project-API)
26+
- Install [gosec](https://github.com/securego/gosec#install)
27+
28+
29+
### Sending the results to Codacy
30+
31+
Sending the results of running gosec to Codacy involves the steps below, which you can automate in your CI build process:
32+
33+
1. Run gosec
34+
2. Convert the gosec output to a format that the Codacy API accepts
35+
3. Send the results to Codacy
36+
4. Finally, signal that Codacy can use the sent results and start a new analysis
2637

2738
```bash
2839
export PROJECT_TOKEN="YOUR-TOKEN"

0 commit comments

Comments
 (0)