Skip to content

Commit d6c9b17

Browse files
authored
Merge pull request #11 from adrienpessu/add/sarif_import_issue_with_ssl_troubleshooting
add API export when there is an SLL certificate not trusted
2 parents 1ad7098 + b539eec commit d6c9b17

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

troubleshooting/sarif-upload/troubleshooting.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,22 @@ codeql github upload-results --github-url=https://cmboling-0bd0debab4ff16db0.ghe
4444
A fatal error occurred: Error uploading SARIF to 'https://cmboling-0bd0debab4ff16db0.ghe-test.ninja/api/v3/repos/santa-foss/fluffy-potato/code-scanning/sarifs' from '/Users/cmboling/Desktop/jubilant-octo-pancake/results.sarif'. REASON: HTTP/1.1 403 Forbidden:::{"message":"Advanced Security must be enabled for this repository to use code scanning.","documentation_url":"https://docs.github.com/enterprise/3.2/rest/reference/code-scanning#upload-a-sarif-file"}
4545
```
4646

47+
:gift: posting SARIF when the SSL certificate is not trusted:
48+
```dotnetcli
49+
curl \
50+
-X POST \
51+
-k \
52+
-H "Accept: application/vnd.github+json" \
53+
-H "Authorization: Bearer <YOUR-TOKEN>"\
54+
-H "X-GitHub-Api-Version: 2022-11-28" \
55+
https://api.github.com/repos/OWNER/REPO/code-scanning/sarifs \
56+
-d '{"commit_sha":"<SHA>","ref":"refs/heads/master","sarif":"<Base64_sarif>"}'
57+
```
58+
More information on the API can be found [here](https://docs.github.com/en/rest/code-scanning?apiVersion=2022-11-28#upload-an-analysis-as-sarif-data)
59+
60+
### Test environments
61+
- GHES 3.2.1 + CodeQL CLI 2.7.2
62+
=======
4763
## SARIF Parsing Errors
4864

4965
### Code Scanning could not process the submitted SARIF file: rejecting SARIF, as there are more runs than allowed (123 > 15)

0 commit comments

Comments
 (0)