Skip to content

fix(ci): DB-backed handler tests, PR openapi self-heal, axios CVE#20

Merged
fcraviolatti merged 1 commit into
mainfrom
fix/ci-search-path-openapi-selfheal-axios
Jul 20, 2026
Merged

fix(ci): DB-backed handler tests, PR openapi self-heal, axios CVE#20
fcraviolatti merged 1 commit into
mainfrom
fix/ci-search-path-openapi-selfheal-axios

Conversation

@fcraviolatti

Copy link
Copy Markdown
Contributor

Summary

  • Fixes the deterministic CI failure since feat/org-scoped-api-keys: admin_api_keys_test.go / admin_delegation_escalation_test.go opened a raw pgxpool without the identity, sessions, audit, public search_path (migration 000017 moved organizations et al. out of public), so every DB-backed test failed with relation "organizations" does not exist. Mirrors the existing fix in idor_scoping_test.go.
  • Fixes openapi-check's self-heal step failing on every pull_request run with fatal: couldn't find remote ref 18/mergeGITHUB_REF_NAME on PR events is the synthetic merge ref, not a pushable branch. Self-heal now only runs on push; PR runs fail loudly with instructions instead.
  • Bumps axios to 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 fix also cleared form-data/react-router/vite advisories within existing semver ranges.
  • CodeQL alert #59 (go/weak-sensitive-data-hashing) dismissed as a false positive and documented inline: hashKey's input is a 256-bit crypto/rand token, not a low-entropy password, so SHA-256 is the correct primitive.

Test plan

  • go build ./..., go vet ./...
  • Ran the previously-failing suite against a throwaway Postgres: go test ./internal/handler/... ./internal/repository/... — 325/325 pass
  • npm audit in frontend/ — 0 vulnerabilities
  • npm run build in frontend/ — succeeds

…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.
@fcraviolatti
fcraviolatti merged commit c30c580 into main Jul 20, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant