Urgent.News

What's breaking now, across thousands of outlets.

Tech

How to Find Exposed API Keys in Your Git Repository (Before an Attacker Does)

Why Git History Is a Credential Graveyard Developers move fast. A Stripe secret key gets pasted into .env for a quick test, the file accidentally lands in a commit, someone notices and deletes it, but the damage is already done. Git history is append-only by design. That deleted file still lives in every clone of the repo, readable with a single git log or git show command. The same pattern plays…

Git history can be a graveyard for exposed credentials, as deleted files still reside in every clone. Attackers leverage this knowledge, scanning public repositories continuously. Exposed API keys, tokens, service account credentials, database connection strings, private keys, and OAuth client secrets are some common types. A manual search using grep with specific patterns can help initially, but regex has a high false-positive rate, missing obfuscated or base64-encoded values.

Tools like git-secrets, truffleHog, and gitleaks can scan the entire Git history. It's crucial to audit current working trees, full Git history, .env files, and config templates. Remediation involves revoking and rotating the secret before rewriting history, if possible. Preventive measures include pre-commit hooks, push protection, secrets managers, and least-privilege IAM.

SOC 2 and HIPAA compliance require continuous secret scanning and evidence of adherence to security rules.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Monitoring Jetson CPU, GPU, Temperature and Power from a Flutter Robot Dashboard

Monitoring Jetson CPU, GPU, Temperature and Power from a Flutter Robot Dashboard Create a lightweight telemetry service that collects Jetson health metrics and exposes them to Flutter.

  • Flutter robot dashboard monitors Jetson CPU, GPU, temperature, and power
  • Telemetry service, Flutter dashboard, and ROS 2 architecture form core components
  • Prerequisites include Jetson developer kit, Linux environment, and ROS 2 familiarity

Memory efficiency: bytes per key

Part 5 of 7 · ← Latency under load · Next: Operational simplicity → Part 5. The shortest post in the series, and the least arguable number in it — because memory footprint is about data-structure design, not how hard you drive the client. It's the same on a laptop and on 48 bare-metal cores.

More from Saturday 12 September →