Skip to content

Security infrastructure: CI audit, gem signing, safety docs#9

Merged
ardavis merged 3 commits into
masterfrom
fizzy-855-activeitem-remaining-security-infrastruc
May 26, 2026
Merged

Security infrastructure: CI audit, gem signing, safety docs#9
ardavis merged 3 commits into
masterfrom
fizzy-855-activeitem-remaining-security-infrastruc

Conversation

@ardavis
Copy link
Copy Markdown
Contributor

@ardavis ardavis commented May 23, 2026

Summary

Addresses remaining security & infrastructure items from card #855 (security audit follow-up from #849).

Infrastructure (implemented)

  • CI pipeline: Added bundler-audit security scanning job alongside existing RSpec + rubocop
  • Gem signing: Configured cert chain, conditional signing key, release workflow integration, and consumer verification docs

Architecture (documented in-code)

  • Thread safety: Documented that Aws::DynamoDB::Client is thread-safe (internal connection pooling) — the Mutex in parallel preload protects only the shared hash, not the client
  • Uniqueness TOCTOU: Added limitation docs to the validator — recommends conditional puts for strong uniqueness, and GSI-backed attributes to avoid scan-based DoS

Setup required

  • Add GEM_SIGNING_KEY secret to GitHub (PEM-encoded private key for gem signing)

Fizzy #855

- Add bundler-audit security job to CI pipeline
- Configure gem signing with cert chain and conditional signing key
- Add signing key setup to release workflow (uses GEM_SIGNING_KEY secret)
- Document thread safety of DynamoDB client in parallel preload
- Document TOCTOU and DoS limitations of uniqueness validator
- Add signature verification instructions to README

Fizzy #855
Comment thread .github/workflows/ci.yml Fixed
Copy link
Copy Markdown
Contributor Author

@ardavis ardavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look into the comment on ci.yml

Restrict GITHUB_TOKEN to contents:read per CodeQL recommendation.
Addresses github-advanced-security bot review comment.
@ardavis
Copy link
Copy Markdown
Contributor Author

ardavis commented May 26, 2026

Added a top-level permissions: contents: read block to ci.yml — this restricts the GITHUB_TOKEN to read-only for CI jobs, which is all they need. Addresses the CodeQL finding from github-advanced-security bot.

The release workflow (auto-tag.yml) already had permissions: contents: write since it needs to push tags.

@ardavis ardavis merged commit b751db5 into master May 26, 2026
3 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.

2 participants