Automated key management system with "find, store, inject, forget" workflow #1
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.
Implements secure automated key management for API keys and secrets across applications. The system discovers required environment variables, stores them in GitHub Secrets, injects them into deployment configurations, and clears sensitive data from memory.
Core Components
key-manager.config.json): Defines 13 environment variables with validation patterns and injection targetsscripts/key-manager.ts): TypeScript implementation with GitHub Secrets API integration, extensible external source fetching, and secure memory clearing.github/workflows/key-manager.yml): Reusable workflow withworkflow_calltrigger for CI/CD integrationUsage
Command line:
GitHub Actions:
Key Features
KEYFINDER_SECRETfor authentication).envfile injection with template supportscan(full workflow),check(audit only),inject(deployment)Security
^postgresql://for DATABASE_URL)Configuration Example
{ "requiredKeys": [ { "name": "DATABASE_URL", "description": "PostgreSQL database connection string", "pattern": "^postgresql://", "required": true, "inject": [".env", "docker-compose"] } ], "externalSources": [ { "name": "keyfinder", "type": "api", "authSecret": "KEYFINDER_SECRET", "endpoint": "https://api.keyfinder.example/v1/keys" } ] }Documentation
Five documentation files provide complete reference:
KEY_MANAGEMENT_QUICKSTART.md- 5-minute setup guideKEY_MANAGEMENT.md- Complete system referenceKEY_MANAGEMENT_EXAMPLES.md- CI/CD integration patternsKEY_MANAGEMENT_INTEGRATION.md- Real-world workflow examplesKEY_MANAGEMENT_SUMMARY.md- Technical implementation detailsTesting
Unit tests validate configuration schema, pattern validation, and essential keys presence. Test infrastructure uses vitest.
Extensibility
The system supports:
STAGING_*,PROD_*)workflow_callOriginal prompt
This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.