AugustAtSeattle / SpeakNote

SpeakNote: Your Personal Virtual Assistant on iOS
MIT License
2 stars 0 forks source link

Enhance Security by Protecting API Keys from Code Exposure #12

Closed AugustAtSeattle closed 10 months ago

AugustAtSeattle commented 10 months ago

Objectives:

Proposed Methods and Steps:

  1. Environment Variables with Xcode Configurations:

    • Store API keys in environment variables defined in .xcconfig files.
    • These files should be excluded from version control to prevent accidental exposure on GitHub.
  2. Keychain Services for Runtime Storage:

    • Use iOS Keychain services for securely storing API keys at runtime.
    • Implement a Keychain wrapper for streamlined access to these keys within the app.
  3. CI/CD Integration for Secure Key Injection:

    • Configure the CI/CD pipeline to securely inject API keys during the build process.
    • Use secret management tools provided by the CI/CD platform to handle API keys.
  4. Codebase Audit and Guidelines:

    • Regularly audit the codebase for hardcoded secrets.
    • Establish and document guidelines for handling sensitive information, emphasizing not committing API keys to version control.
  5. Automated Checks:

    • Implement pre-commit hooks or other automated checks to scan for sensitive information before code is committed to the repository.

Additional Considerations:

Acceptance Criteria: