Skip to content

ci: add security scanning workflow#21

Merged
foxcool merged 4 commits into
mainfrom
feature/ci-security
Jun 27, 2026
Merged

ci: add security scanning workflow#21
foxcool merged 4 commits into
mainfrom
feature/ci-security

Conversation

@foxcool

@foxcool foxcool commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Summary

Extend the security workflow to match the psina security baseline.

Added jobs:

  • govulncheck — scan dependencies for known vulnerabilities
  • gosec — static security analysis (-exclude-generated)
  • gitleaks — scan history for committed secrets

Scanners run on push (main, develop) and pull_request. The existing Claude security review stays gated to pull requests.

🤖 Generated with Claude Code

foxcool and others added 4 commits June 27, 2026 21:54
Extend security workflow with govulncheck (dependency vulnerabilities),
gosec (static analysis), and gitleaks (committed secrets), matching the
psina security baseline. Scanners run on push and pull_request; the
Claude security review stays gated to pull requests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K9Zykqo9eKjAtr3oqgCEwh
Address findings from the new security workflow:
- Bump github.com/jackc/pgx/v5 v5.8.0 -> v5.9.2 to fix GO-2026-5004
  (SQL injection via placeholder confusion with dollar-quoted literals),
  reached from PortfolioStore.ListTransactions.
- Set http.Server.ReadHeaderTimeout to mitigate Slowloris (gosec G112).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K9Zykqo9eKjAtr3oqgCEwh
- Add bounds-checked decimals conversions (decI32/intToI32/intToU32) in the
  portfolio service. Token decimals come from external chain metadata, so the
  narrowing conversions are now clamped to the target range instead of risking
  a silent overflow.
- Annotate the marketdata count conversions with #nosec G115: they narrow row
  counts bounded by request size, well below int32 max.

gosec now reports 0 issues.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K9Zykqo9eKjAtr3oqgCEwh
- Drop the non-existent gRPC :50051 port; the server is a single Connect-RPC
  endpoint over h2c on :8080.
- Correct the health check path to /eye/health.
- Describe the API as Connect-RPC (REST + gRPC on one endpoint) instead of
  gRPC-Gateway, which is not used.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K9Zykqo9eKjAtr3oqgCEwh
@foxcool foxcool merged commit 9333ef0 into main Jun 27, 2026
8 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