📃
Labs Engineering Standards
HomeGuides
  • Labs Engineering Standards
  • Writing Standards
  • Coding
    • Programming Languages
    • Developer Workflow
    • Git
    • Github
    • Code Quality
    • Application Security
  • Frameworks
    • Web API Frameworks
    • React
    • Node.js
    • Spring
  • Platforms & Services
    • 3rd Party Services
    • Data Persistence
  • Infrastructure
    • DNS
    • AWS
    • Heroku
Powered by GitBook
On this page
  • (SC-100) Never Commit Secrets
  • (SC-200) Never Store Secrets

Was this helpful?

  1. Coding

Application Security

PreviousCode QualityNextWeb API Frameworks

Last updated 3 years ago

Was this helpful?

(SC-100) Never Commit Secrets

No secrets, credentials, or sensitive data shall ever be committed to a Git repository, either local or remote.

Rationale:

  • Secrets provide access to administrative functions as well as protected data. Exposing secrets in a repository is a primary attack vector for compromised systems that are exploited every day on the internet. Secrets must be protected at all times and are instantly at risk and exposed when committed into a source code repository.

Alternatives:

  • Communicating shared secrets should only be done via email or Slack. (Note: This will change as we're working on making a secrets management tool available.)

  • Use or an equivalent tool to put secrets into your local environment, which can then be read by your application at runtime.

(SC-200) Never Store Secrets

No software shall maintain user secrets in application storage.

Rationale:

  • Effectively storing and protecting secrets is extremely difficult and incurs a great deal of design, development, and operational overhead.

Alternatives:

  • Always use a trusted 3rd party Identity Provider (IdP) to authenticate users.

Exceptions:

  • Non-user specific secrets (e.g. API keys, etc.) should be stored using secure services and provided to the application at runtime using environment variables.

dotenv