You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f531cc1
Browse filesBrowse the repository at this point in the historyBrowse files
Document the repository lookup failures and the full-scan read
Troubleshooting now shows the two messages a missing repository scope
produces in 2.13.0, which scope each one points at, and that both follow
the exit-code flags. It also says full-scans:list covers the full-scan
read that --strict-blocking, --enable-gitlab-security and
--legal-format fossa use for alerts on unchanged packages.
Copy file name to clipboardExpand all lines: docs/troubleshooting.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,22 @@
12
12
See [Exit codes in CI](ci-cd.md#exit-codes-in-ci) for the flag combinations and
13
13
[upgrade guidance](../README.md#upgrading-to-2130) for older pipeline rules.
14
14
15
+
## Repository lookup or creation fails
16
+
17
+
A run that compares scans looks up the repository first, unless `--base-scan-id` or
18
+
`--base-commit-sha` is set. A token missing a repository scope stops there with the
19
+
infrastructure-error code (`3` by default):
20
+
21
+
| Log message | Missing scope |
22
+
|-------------|---------------|
23
+
|`Failed to get repository <repo> (HTTP 403). The API token may be missing the repo:list scope.`|`repo:list`|
24
+
|`API failure while creating repository <repo> (HTTP 403): ...`, then `A 403 here usually means the API token is missing the repo:create scope.`|`repo:create`. Only needed when the repository does not exist yet |
25
+
26
+
Both failures follow `--disable-blocking` and `--exit-code-on-api-error`. Before
27
+
2.13.0, any failed lookup was treated as a missing repository, so a token without
28
+
`repo:list` ended in the `repo:create` message, and the run exited `2` whatever
29
+
either flag said.
30
+
15
31
## API token scopes for scan comparisons
16
32
17
33
PR/MR runs compare the new scan against the repository's head scan. That comparison
@@ -22,6 +38,10 @@ scopes in addition to whatever the scan itself needs:
22
38
-`diff-scans:list`
23
39
-`full-scans:list`
24
40
41
+
`full-scans:list` also covers the read of the new full scan that `--strict-blocking`,
42
+
`--enable-gitlab-security` and `--legal-format fossa` use to get alerts on unchanged
43
+
packages.
44
+
25
45
If the token is missing them the scan still succeeds, so this is easy to miss. The only
26
46
signal is a warning, after which the CLI falls back to the older streaming comparison:
0 commit comments