You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Encrypt agent GitHub PAT tokens using AES-256-GCM encryption, matching
the existing pattern used for cloud credentials. PAT is now sealed in
storage and only decrypted when needed for GitHub operations.
Changes:
- Add Agent.PATSealed field (encrypted via FLOW_SECRET_KEY)
- Add Agent.GetPAT() / SetPAT() methods with backward compatibility
for plaintext PAT (agents created before this change)
- Update all PAT access points to use GetPAT()
- Update all PAT write points to use SetPAT()
- API handlers (test-auth, install-webhook) now decrypt on-demand
- Build executor: decrypt PAT before passing to clone/registry-auth
- Promote executor: decrypt PAT before GitHub operations
- SAST executor: decrypt PAT before cloning
- Fix Dockerfile Go version: 1.24 → 1.25 (go.mod requirement)
Backward compatibility:
- Agents with plaintext PAT (pre-encryption) still work
- GetPAT() falls back to plaintext field if PATSealed is empty
- No database migration required
Testing:
- All encryption/decryption operations tested
- Docker build passes
- Code compiles without errors
0 commit comments