Skip to content

Security: SpaceCorps/Notify-Cli

Security

SECURITY.md

Security Guidelines

πŸ”’ Protecting Your Credentials

This is a public repository. Never commit secrets, credentials, or personal information.

βœ… What's Safe (Protected by .gitignore)

The following files are automatically excluded from git:

Configuration Files

  • config.yaml - Your actual configuration with real email addresses
  • src/config.yaml - Alternate location (both are ignored)

OAuth Credentials

  • client_secret*.json - OAuth app credentials from Google Cloud
  • user_credential*.json - Generated access/refresh tokens
  • **/gmail-credentials/ - Entire credentials directory

Test Files

  • test-*.txt - Test email files you create
  • test-*.html - HTML test files you create

Build Artifacts

  • bin/, obj/ - Build output directories
  • nupkgs/ - NuGet packages

⚠️ What Gets Committed (Public)

These files ARE committed and visible to everyone:

  • example.config.yaml - Example configuration (no real credentials)
  • Source code files (.cs, .csproj)
  • Documentation (.md files)
  • .gitignore itself

πŸ” OAuth Credential Storage

OAuth credentials are stored outside the repository in your user profile:

  • Windows: %APPDATA%\Notify.Console\gmail-credentials\{profile}\
  • Unix: ~/.config/notify-console/gmail-credentials/{profile}/

These directories are:

  • Outside the git repository
  • User-specific
  • Never committed to version control
  • Secure from accidental commits

πŸ“‹ Setup Checklist

Before committing any changes:

  1. βœ… Check .gitignore includes config.yaml
  2. βœ… Use example.config.yaml as a template only
  3. βœ… Keep OAuth credentials in %APPDATA% (Windows) or ~/.config (Unix)
  4. βœ… Run git status to verify no secrets are staged
  5. βœ… Never commit files with real email addresses or API keys

🚨 If You Accidentally Commit Secrets

If you accidentally commit credentials:

  1. Revoke the credentials immediately at https://console.cloud.google.com
  2. Remove from git history:
    # Remove file from git but keep locally
    git rm --cached config.yaml
    git commit -m "Remove accidentally committed config"
  3. For sensitive history, consider using git filter-branch or BFG Repo-Cleaner
  4. Create new credentials and update your config.yaml

πŸ“– Best Practices

  1. Always use example.config.yaml as template - Copy it to config.yaml
  2. Never edit example.config.yaml with real data - Keep it generic
  3. Double-check before commits - Run git status and git diff --staged
  4. Use separate Google Cloud projects - For personal vs work profiles
  5. Rotate credentials periodically - Delete and recreate OAuth credentials
  6. Limit OAuth scopes - Only use gmail.send scope (not gmail.modify)

πŸ›‘οΈ Current Protection Status

  • βœ… .gitignore configured to exclude config.yaml
  • βœ… OAuth credentials stored in user profile directory (outside repo)
  • βœ… Example configuration has placeholder values only
  • βœ… Build artifacts excluded
  • βœ… Test files excluded

πŸ“ž Questions?

If you're unsure whether a file should be committed, check:

  1. Does it contain real email addresses? β†’ Don't commit
  2. Does it contain API keys or OAuth credentials? β†’ Don't commit
  3. Is it personal test data? β†’ Don't commit
  4. Is it a generic example? β†’ Safe to commit

When in doubt, don't commit it.

There aren't any published security advisories