Repository navigation
[APPX-14752] [APPX-14753] Remediate Arnica code risk findings for Agent SDK #468
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
Merged
Matjaz Pirnovar (Mat001)
merged 16 commits into
master
from
mpirnovar-agent-arnica-appx-14752
Nov 25, 2026
+329
−312
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
85d526e
[APPX-14752] Remediate Arnica code risk findings for Agent SDK
Mat001 0498376
[APPX-14752] Address Arnica review: bump grpc 1.83.2 and x/net 0.62.0
Mat001 c3aef15
[APPX-14752] Fix acceptance CI: Python 3.9 unavailable on current runner
Mat001 41e90c1
[APPX-14752] Fix lint: pin golangci-lint analysis target to Go 1.24
Mat001 edc6b25
[APPX-14752] Revert acceptance-job Python bump; track infra rot separ…
Mat001 e607811
[APPX-14752] Raise golangci-lint timeout to 5m
Mat001 698c0bf
[APPX-14752] Upgrade golangci-lint to v2 for Go 1.26 compatibility
Mat001 578ea0d
[APPX-14752] Fix golangci-lint install: version-pin the install script
Mat001 ebcd453
[APPX-14752] Dockerfiles: set GOTOOLCHAIN=auto so pinned toolchain is…
Mat001 4c675e6
[APPX-14752] Fix acceptance CI: Python 3.12 + openapi_core 0.18.2
Mat001 4b44415
[APPX-14752] Bump otel to v1.47.0 for newly published GO-2026-6974
Mat001 0faac51
[APPX-14752] Bump go-sdk v2.5.0 -> v2.7.0 for holdout support (fixes …
Mat001 fda9d79
[APPX-14752] Re-trigger CI after FSC harness fix (compat-suite #710)
Mat001 e045669
[APPX-14752] Address review: HEALTHCHECK port env, govulncheck CI, co…
Mat001 0e4b000
[APPX-14752] govulncheck CI: generate statik package before scanning
Mat001 113c0a3
[APPX-14752] Pin govulncheck job tool versions
Mat001 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,79 +1,73 @@ | ||
| linters-settings: | ||
| govet: | ||
| enable: | ||
| - shadow | ||
| gocyclo: | ||
| min-complexity: 30 # Increased to allow existing complex functions | ||
| dupl: | ||
| threshold: 200 | ||
| misspell: | ||
| locale: US | ||
| revive: | ||
| min-confidence: 0 | ||
| rules: | ||
| # Disabled: Would require breaking API changes (Ids -> IDs) | ||
| - name: var-naming | ||
| disabled: true | ||
| # Disabled: Parameters often required for interface compliance | ||
| - name: unused-parameter | ||
| disabled: true | ||
| # Disabled: Style preference, not a bug | ||
| - name: superfluous-else | ||
| disabled: true | ||
| # Disabled: Would require breaking API changes (stuttering names) | ||
| - name: exported | ||
| disabled: true | ||
| # Disabled: Style preference for context key types | ||
| - name: context-keys-type | ||
| disabled: true | ||
|
|
||
| version: "2" | ||
| run: | ||
| concurrency: 4 | ||
| linters: | ||
| disable-all: true | ||
| default: none | ||
| enable: | ||
| - unused | ||
| - copyloopvar | ||
| - dupl | ||
| - gosec | ||
| # - gocritic # Temporarily disabled due to compatibility issues with Go 1.24 | ||
| - gocyclo | ||
| - revive | ||
| - gosimple | ||
| - gosec | ||
| - govet | ||
| - ineffassign | ||
| - staticcheck | ||
| - misspell | ||
| - nakedret | ||
| - prealloc | ||
| - copyloopvar | ||
| - stylecheck | ||
| - typecheck | ||
| - revive | ||
| - staticcheck | ||
| - unconvert | ||
| - unparam | ||
|
|
||
| run: | ||
| concurrency: 4 | ||
|
|
||
| issues: | ||
| exclude-dirs: | ||
| - vendor | ||
| exclude-rules: | ||
| - text: "weak cryptographic primitive" | ||
| linters: | ||
| - gosec | ||
| # Suppress unhandled errors in Redis cleanup code (non-critical) | ||
| - path: pkg/syncer/pubsub/redis.*\.go | ||
| linters: | ||
| - gosec | ||
| text: "G104" | ||
| # Suppress context key type warnings (would require refactoring) | ||
| - linters: | ||
| - staticcheck | ||
| text: "SA1029" | ||
| # Suppress comment format warnings (style preference) | ||
| - linters: | ||
| - stylecheck | ||
| text: "ST1020|ST1021" | ||
| # Suppress naked return warnings in rest_ups.go (existing code, refactoring is risky) | ||
| - path: plugins/userprofileservice/services/rest_ups\.go | ||
| linters: | ||
| - nakedret | ||
| exclude-use-default: false | ||
| - unused | ||
| settings: | ||
| dupl: | ||
| threshold: 200 | ||
| gocyclo: | ||
| min-complexity: 30 | ||
| govet: | ||
| enable: | ||
| - shadow | ||
| misspell: | ||
| locale: US | ||
| revive: | ||
| rules: | ||
| - name: var-naming | ||
| disabled: true | ||
| - name: unused-parameter | ||
| disabled: true | ||
| - name: superfluous-else | ||
| disabled: true | ||
| - name: exported | ||
| disabled: true | ||
| - name: context-keys-type | ||
| disabled: true | ||
| exclusions: | ||
| generated: lax | ||
| rules: | ||
| - linters: | ||
| - gosec | ||
| text: weak cryptographic primitive | ||
| - linters: | ||
| - gosec | ||
| path: pkg/syncer/pubsub/redis.*\.go | ||
| text: G104 | ||
| - linters: | ||
| - staticcheck | ||
| text: SA1029 | ||
| - linters: | ||
| - staticcheck | ||
| text: ST1020|ST1021 | ||
| - linters: | ||
| - nakedret | ||
| path: plugins/userprofileservice/services/rest_ups\.go | ||
| paths: | ||
| - vendor | ||
| - third_party$ | ||
| - builtin$ | ||
| - examples$ | ||
| formatters: | ||
| exclusions: | ||
| generated: lax | ||
| paths: | ||
| - third_party$ | ||
| - builtin$ | ||
| - examples$ |
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 |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # Dependency security notes | ||
|
|
||
| This document records decisions for Arnica (and similar SCA/supply-chain) | ||
| findings that are **accepted and documented** rather than remediated by a | ||
| version bump or replacement. Findings that were remediated (vulnerable | ||
| dependency upgrades, the Go toolchain bump, the notification handler change, | ||
| and the container healthchecks) are not listed here — they live in the code and | ||
| `go.mod`/requirements history. | ||
|
|
||
| Reviewed against the repository's Apache-2.0 license. | ||
|
|
||
| ## Reputation: low-reputation dependencies (accepted) | ||
|
|
||
| All five flagged modules are **indirect** dependencies. They are not imported | ||
| directly by Agent code; each is pulled in by a well-maintained, widely used | ||
| direct dependency. They cannot be replaced without replacing their parent, and | ||
| no better-maintained drop-in exists. We accept them. | ||
|
|
||
| | Module | Pulled in by | Used for | | ||
| | --- | --- | --- | | ||
| | `github.com/lestrrat-go/httpcc` | `github.com/lestrrat-go/jwx/v2/jwk` | JWT/JWK verification (`pkg/middleware` auth) | | ||
| | `github.com/lestrrat-go/option` | `github.com/lestrrat-go/jwx/v2/jwk` | JWT/JWK verification (`pkg/middleware` auth) | | ||
| | `github.com/lestrrat-go/iter` | `github.com/lestrrat-go/jwx/v2/jwk` | JWT/JWK verification (`pkg/middleware` auth) | | ||
| | `github.com/VividCortex/gohistogram` | `github.com/go-kit/kit/metrics` | expvar/generic metrics (`pkg/metrics`) | | ||
| | `github.com/matttproud/golang_protobuf_extensions/v2` | `github.com/prometheus/client_golang` | Prometheus metrics (`pkg/metrics`) | | ||
|
|
||
| Notes: | ||
|
|
||
| - The `lestrrat-go/*` helpers are maintained as part of the `jwx` project, which | ||
| is the JWT library this service depends on for request authentication. | ||
| - `matttproud/golang_protobuf_extensions/v2` was mis-listed as `mattproud` | ||
| (single `t`) in the Arnica list view; the real module name has three `t`s. It | ||
| is an implementation detail of the Prometheus client and is only reachable | ||
| through it. | ||
|
|
||
| ## License: MPL-2.0 dependencies (accepted) | ||
|
|
||
| MPL-2.0 is a weak, file-level reciprocal license. Its source-disclosure | ||
| obligation is triggered only when the MPL-licensed **files themselves** are | ||
| modified and distributed. Agent consumes all of these as unmodified upstream | ||
| dependencies, so no reciprocal obligation is triggered, and MPL-2.0 is | ||
| compatible with this Apache-2.0 project. We accept them. | ||
|
|
||
| | Dependency | Scope | Pulled in by | | ||
| | --- | --- | --- | | ||
| | `github.com/hashicorp/hcl@v1.0.0` | Go, indirect | `github.com/spf13/viper` (config parsing) | | ||
| | `github.com/hashicorp/go-multierror@v1.1.1` | Go, indirect | `github.com/optimizely/go-sdk/v2` client | | ||
| | `github.com/hashicorp/errwrap@v1.1.0` | Go, indirect | `github.com/hashicorp/go-multierror` | | ||
| | `certifi` | Python, `examples/requirements.txt` | example SSE client script only | | ||
|
|
||
| Notes: | ||
|
|
||
| - The `hashicorp/*` modules are unmodified, standard transitive dependencies and | ||
| are not vendored or patched. | ||
| - `certifi` ships only in the Python **example** requirements (not in the Agent | ||
| binary or any released artifact). It was also upgraded to the latest release | ||
| to clear its vulnerability finding. | ||
|
|
||
| ## Container image healthchecks | ||
|
|
||
| - `scripts/dockerfiles/Dockerfile.alpine` defines a `HEALTHCHECK` that probes the | ||
| admin listener's `/health` endpoint using the `wget` bundled in the Alpine base | ||
| image. | ||
| - `scripts/dockerfiles/Dockerfile.static` is a `FROM scratch` image with no shell | ||
| or HTTP client to run a `HEALTHCHECK` command, and the binary exposes no health | ||
| subcommand. Health must be checked over HTTP against the `/health` endpoint via | ||
| the orchestrator (e.g. a Kubernetes liveness/readiness probe). This is | ||
| documented inline in that Dockerfile. |
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 |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| certifi==2025.1.31 | ||
| certifi==2026.10.23 | ||
| charset-normalizer==3.4.1 | ||
| idna==3.10 | ||
| requests==2.32.4 | ||
| idna==3.20 | ||
| requests==2.34.2 | ||
| six==1.17.0 | ||
| # sseclient 0.0.27 is the latest published release; pinned as-is. Its transitive | ||
| # dependencies (requests, urllib3) are pinned to current versions above. | ||
| sseclient==0.0.27 | ||
| urllib3==2.6.0 | ||
| urllib3==2.8.0 | ||
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.
Uh oh!
There was an error while loading. Please reload this page.