fix(ci): DB-backed handler tests, PR openapi self-heal, axios CVE#20
Merged
Merged
Conversation
…os CVE - internal/handler: apiKeyTestPool/roleTestPool used a raw pgxpool without the identity/sessions/audit search_path (migration 000017 moved organizations et al. out of public), so every DB-backed test in admin_api_keys_test.go and admin_delegation_escalation_test.go failed with 'relation "organizations" does not exist'. Deterministic since feat/org-scoped-api-keys landed. Mirror the search_path fix already used in idor_scoping_test.go. - ci.yml: openapi-check's self-heal did 'git pull --rebase origin ""', but on pull_request events GITHUB_REF_NAME is the synthetic "<pr>/merge" ref, not a pushable branch, so it failed with 'couldn't find remote ref'. Self-heal now only runs on push; PR runs fail loudly with instructions to commit the regenerated spec. - frontend: bump axios to 1.18.1 (GHSA-xj6q-8x83-jv6g, dependabot alert #5 — prototype-pollution amplifier in Basic auth subfield handling). npm audit fix also picked up form-data/react-router/vite within existing semver ranges. Also dismissed CodeQL alert #59 (go/weak-sensitive-data-hashing) as a false positive: hashKey's input is a 256-bit crypto/rand token, not a low-entropy password, so SHA-256 is the right primitive there — see the lgtm-annotated comment in admin_api_keys.go.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
feat/org-scoped-api-keys:admin_api_keys_test.go/admin_delegation_escalation_test.goopened a raw pgxpool without theidentity, sessions, audit, publicsearch_path (migration 000017 movedorganizationset al. out ofpublic), so every DB-backed test failed withrelation "organizations" does not exist. Mirrors the existing fix inidor_scoping_test.go.openapi-check's self-heal step failing on everypull_requestrun withfatal: couldn't find remote ref 18/merge—GITHUB_REF_NAMEon PR events is the synthetic merge ref, not a pushable branch. Self-heal now only runs onpush; PR runs fail loudly with instructions instead.axiosto 1.18.1 (GHSA-xj6q-8x83-jv6g / dependabot alert Harden int conversion & email header sanitize to clear CodeQL #5, prototype-pollution amplifier in Basic auth subfield handling).npm audit fixalso clearedform-data/react-router/viteadvisories within existing semver ranges.go/weak-sensitive-data-hashing) dismissed as a false positive and documented inline:hashKey's input is a 256-bitcrypto/randtoken, not a low-entropy password, so SHA-256 is the correct primitive.Test plan
go build ./...,go vet ./...go test ./internal/handler/... ./internal/repository/...— 325/325 passnpm auditinfrontend/— 0 vulnerabilitiesnpm run buildinfrontend/— succeeds