Skip to content

Commit 9ba480c

Browse files
committed
add API export when there is an SLL certificate not trusted
1 parent 7dbc1b5 commit 9ba480c

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

troubleshooting/sarif-upload/troubleshooting.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,19 @@ codeql github upload-results --github-url=https://cmboling-0bd0debab4ff16db0.ghe
4343
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"}
4444
```
4545

46+
:gift: posting SARIF when the SSL certificate is not trusted:
47+
```dotnetcli
48+
curl \
49+
-X POST \
50+
-k \
51+
-H "Accept: application/vnd.github+json" \
52+
-H "Authorization: Bearer <YOUR-TOKEN>"\
53+
-H "X-GitHub-Api-Version: 2022-11-28" \
54+
https://api.github.com/repos/OWNER/REPO/code-scanning/sarifs \
55+
-d '{"commit_sha":"<SHA>","ref":"refs/heads/master","sarif":"<Base64_sarif>"}'
56+
```
57+
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)
58+
4659
### Test environments
4760
- GHES 3.2.1 + CodeQL CLI 2.7.2
4861

0 commit comments

Comments
 (0)