-
Notifications
You must be signed in to change notification settings - Fork 1
fix(PPSC-602): resolve all code scanning security alerts + dependabot updates #132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shb7628
wants to merge
79
commits into
main
Choose a base branch
from
fix/PPSC-602-mega
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
79 commits
Select commit
Hold shift + click to select a range
50afafb
chore(deps): bump actions/upload-artifact from 6 to 7
dependabot[bot] 3871de3
chore(deps): bump github.com/go-git/go-git/v5 from 5.16.5 to 5.17.0
dependabot[bot] d7f3e48
chore(deps): bump actions/download-artifact from 7 to 8
dependabot[bot] a644e65
chore(deps): bump anchore/sbom-action from 0.22.2 to 0.23.0
dependabot[bot] 57a11c1
Merge branch 'main' into dependabot/github_actions/anchore/sbom-actio…
yiftach-armis 5516238
Merge branch 'main' into dependabot/go_modules/github.com/go-git/go-g…
yiftach-armis 1b337e7
Merge branch 'main' into dependabot/github_actions/actions/download-a…
yiftach-armis b68c279
Merge branch 'main' into dependabot/github_actions/actions/upload-art…
yiftach-armis dca1cd4
chore(deps): bump github.com/mattn/go-runewidth from 0.0.20 to 0.0.21
dependabot[bot] 727e8b3
chore(deps): bump golang.org/x/term from 0.40.0 to 0.41.0
dependabot[bot] f84580d
chore(deps): bump anchore/sbom-action from 0.23.0 to 0.23.1
dependabot[bot] 26d7c1b
chore(deps): bump anchore/sbom-action from 0.23.0 to 0.24.0
dependabot[bot] 9aa3827
[PPSC-602] fix: document CLI error info exposure as acceptable (CWE-209)
shb7628 9407382
[PPSC-602] fix: document progress bar size as display-only (CWE-770)
shb7628 bc9d504
[PPSC-602] fix: document spinner loop exit conditions (CWE-835)
shb7628 003420c
[PPSC-602] fix: truncate and label debug auth output (CWE-215)
shb7628 36d2be6
[PPSC-602] fix: document region cache credential storage (CWE-522)
shb7628 9284549
[PPSC-602] fix: document HTTP client URL source as non-user-controlle…
shb7628 d17df61
[PPSC-602] fix: document JWT signature verification design decision (…
shb7628 31418e3
[PPSC-602] fix: add character allowlist for image name validation (CW…
shb7628 93e6a39
[PPSC-602] fix: document path traversal protection for tarball input …
shb7628 1cef01b
[PPSC-602] fix: document existing page limit bounds validation (CWE-770)
shb7628 b44d8c9
[PPSC-602] fix: document path validation in loadSnippetFromFile (CWE-22)
shb7628 95cea09
[PPSC-602] fix: document GetRawToken security design decision (CWE-522)
shb7628 88336fc
[PPSC-602] fix: document intentionally discarded fmt.Fprintf returns …
shb7628 bd12c79
[PPSC-602] fix: validate install directory before PATH modification (…
shb7628 272a93b
[PPSC-602] fix: add warning before printing token to stdout (CWE-522)
shb7628 d43701e
[PPSC-602] fix: reject scan paths outside repository root (CWE-22)
shb7628 a2adefc
[PPSC-602] fix: add upper bound to scan and upload timeouts (CWE-770)
shb7628 3a23bc0
[PPSC-602] fix: add top-level read-only permissions to workflow (CKV2…
shb7628 5356bdd
[PPSC-602] fix: abort install when checksum tools unavailable (CWE-494)
shb7628 ddc1801
[PPSC-602] fix: document intentionally discarded stderr write (CWE-252)
shb7628 fc8ebde
[PPSC-602] fix: document intentionally discarded cursor control write…
shb7628 86b8561
[PPSC-602] fix: add size limit for .armisignore file reads (CWE-770)
shb7628 2a5ca60
[PPSC-602] fix: resolve symlinks to mitigate TOCTOU in SafeJoinPath (…
shb7628 0aa9935
[PPSC-602] fix: document test auth provider as false positive (CWE-522)
shb7628 a4c87cb
[PPSC-602] fix: document help buffer bounded by fixed command set (CW…
shb7628 f20facb
[PPSC-602] fix: validate install directory against allowed paths (CWE…
shb7628 98e991b
[PPSC-602] fix: guard against integer overflow in calculateFilesSize …
shb7628 9bcdcc0
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe20-improper-inpu…
shb7628 2c7a7c5
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe209-error-info-e…
shb7628 7e27d7f
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe215-debug-info-e…
shb7628 f5b6a4d
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe22-path-traversa…
shb7628 f055269
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe22-path-traversa…
shb7628 eb98429
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe22-path-traversa…
shb7628 cfd3d24
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe22-path-traversa…
shb7628 f877449
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe252-unchecked-fp…
shb7628 5ecac74
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe253-unchecked-fp…
shb7628 11d66e3
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe253-unchecked-fp…
shb7628 525931d
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe327-jwt-no-signa…
shb7628 ee18567
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe367-toctou-race'…
shb7628 bb0314b
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe427-uncontrolled…
shb7628 7869cf3
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe494-download-no-…
shb7628 cc95a45
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe522-creds-in-cac…
shb7628 fa71583
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe522-raw-token-re…
shb7628 c4319c9
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe522-test-auth-he…
shb7628 24653ce
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe522-token-printe…
shb7628 55dcac8
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe770-unbounded-he…
shb7628 571ef4b
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe770-unbounded-ig…
shb7628 cda103c
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe770-unbounded-pa…
shb7628 32fab0c
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe770-unbounded-pr…
shb7628 8df6d72
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe770-unbounded-sc…
shb7628 bf39ad0
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe835-infinite-loo…
shb7628 4204a96
Merge remote-tracking branch 'origin/fix/PPSC-602-cwe918-ssrf-httpcli…
shb7628 40a3ad9
Merge remote-tracking branch 'origin/fix/PPSC-602-gha-workflow-permis…
shb7628 f350496
Merge remote-tracking branch 'origin/dependabot/github_actions/action…
shb7628 3b1c4dd
Merge remote-tracking branch 'origin/dependabot/github_actions/action…
shb7628 6519d38
Merge remote-tracking branch 'origin/dependabot/github_actions/anchor…
shb7628 9bd7b0e
Merge remote-tracking branch 'origin/dependabot/github_actions/anchor…
shb7628 3b2b04e
Merge remote-tracking branch 'origin/dependabot/go_modules/github.com…
shb7628 31590f5
Merge remote-tracking branch 'origin/dependabot/go_modules/github.com…
shb7628 4bb05ab
Merge remote-tracking branch 'origin/dependabot/go_modules/golang.org…
shb7628 99858ac
Merge dependabot/github_actions/anchore/sbom-action-0.24.0 (resolve c…
shb7628 9ae4cf6
Merge main into mega branch, resolve install.ps1 conflict
shb7628 4c7d0d4
chore: update CI workflows to Go 1.25 for dependabot module updates
shb7628 cc954a6
fix: update path tests for EvalSymlinks in SafeJoinPath
shb7628 cd5e580
fix: address 4 additional security scan findings
shb7628 63c9f88
ci: trigger security scan on pull requests
shb7628 3236af9
fix: address 15 remaining security scan findings
shb7628 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -108,7 +108,7 @@ | |
|
|
||
| req.Header.Set("Content-Type", "application/json") | ||
|
|
||
| resp, err := c.httpClient.Do(req) //nolint:gosec // G704: authEndpoint is constructed from validated config, not user input | ||
| resp, err := c.httpClient.Do(req) //nolint:gosec // CWE-522,G704: credentials sent over HTTPS to validated endpoint | ||
Check failureCode scanning / Armis Security Scanner Insecure Design (CWE-522: Insufficiently Protected Credentials) High
Insecure Design (CWE-522: Insufficiently Protected Credentials): The Authenticate function builds a JSON body that includes the client secret and sends it with an HTTP POST request. The client enforces HTTPS only for non‑localhost URLs; for localhost it permits plain HTTP. Consequently, when the base URL is an insecure HTTP address (e.g., http://localhost), the secret is transmitted without additional protection beyond the transport layer, matching CWE‑522. The secret originates from the function arguments, flows through json.Marshal, and reaches the network request made by httpClient.Do, with no sanitization in between. This creates a reachable taint path that can expose credentials to anyone able to intercept the local network traffic. The vulnerability is exposed through a network‑accessible authentication endpoint, giving it an exposure rating of 6 and a high likelihood of exploitation.
|
||
| if err != nil { | ||
| return nil, fmt.Errorf("authentication request failed: %w", err) | ||
| } | ||
|
|
@@ -125,9 +125,9 @@ | |
| } | ||
|
|
||
| if resp.StatusCode != http.StatusOK { | ||
| // Log detailed error info when debug mode is enabled | ||
| // Log error metadata when debug mode is enabled (body omitted to avoid credential leakage). | ||
| if c.debug { | ||
| fmt.Fprintf(os.Stderr, "DEBUG: Auth failed with status %d, body: %s\n", resp.StatusCode, string(body)) | ||
| fmt.Fprintf(os.Stderr, "[DEBUG] Auth failed with status %d, response length: %d bytes\n", resp.StatusCode, len(body)) | ||
| } | ||
| // Don't include raw response body in error to prevent potential info leakage | ||
| return nil, &AuthError{StatusCode: resp.StatusCode, Message: fmt.Sprintf("authentication failed (status %d)", resp.StatusCode)} | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check failure
Code scanning / Armis Security Scanner
Insecure Design (CWE-522: Insufficiently Protected Credentials) High