Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
IT Security NachrichtenKI-Coding-Agenten leaken über 13.000 interne Screenshots auf GitHub(30.09.2026 um 15:22 Uhr)
•
IT Security NachrichtenIT Security News Hourly Summary 2026-09-30 15h : 13 posts(30.09.2026 um 15:00 Uhr)
•
IT Security NachrichtenDon’t Make It Easy For Them: Cybersecurity Awareness Month 2026(30.09.2026 um 15:01 Uhr)
•
IT Security NachrichtenTrump, Six AI Giants Sign ‘Super Intelligence’ Safety Accord(30.09.2026 um 15:02 Uhr)
•••
IT Security NachrichtenHow to Use Cyber Risk Quantification to Justify Security Budgets(30.09.2026 um 15:19 Uhr)
•
IT Security NachrichtenTrump, Six AI Giants Sign 'Super Intelligence' Safety Accord(30.09.2026 um 15:00 Uhr)
•
Sicherheitslücken (CVE)WatchGuard Patches Critical Fireware OS Code Injection Vulnerability(30.09.2026 um 15:16 Uhr)
••
IT Security NachrichtenKI-Coding-Agenten leaken über 13.000 interne Screenshots auf GitHub(30.09.2026 um 15:22 Uhr)
•
IT Security NachrichtenIT Security News Hourly Summary 2026-09-30 15h : 13 posts(30.09.2026 um 15:00 Uhr)
•
IT Security NachrichtenDon’t Make It Easy For Them: Cybersecurity Awareness Month 2026(30.09.2026 um 15:01 Uhr)
•
IT Security NachrichtenTrump, Six AI Giants Sign ‘Super Intelligence’ Safety Accord(30.09.2026 um 15:02 Uhr)
•••
IT Security NachrichtenHow to Use Cyber Risk Quantification to Justify Security Budgets(30.09.2026 um 15:19 Uhr)
•
IT Security NachrichtenTrump, Six AI Giants Sign 'Super Intelligence' Safety Accord(30.09.2026 um 15:00 Uhr)
•
Sicherheitslücken (CVE)WatchGuard Patches Critical Fireware OS Code Injection Vulnerability(30.09.2026 um 15:16 Uhr)
••
Intelligence View
⚡ tsecurity.de Intelligence

DevSecOps for Git: Security Starts at Commit Time

Most security incidents don’t start in production. They start with a small mistake like: git commit -m "temporary fix" This article explains how to implement real DevSecOps practices for Git, step by step — in a way that developers, Dev…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!



Most security incidents don’t start in production.

They start with a small mistake like:



git commit -m "temporary fix"



This article explains how to implement real DevSecOps practices for Git, step by step — in a way that developers, DevOps, and security teams all understand.









1. .gitignore — First Line of Defense






Purpose



Prevent sensitive files from ever being tracked by Git.






Common files that must be ignored




  • .env, .env.*

  • *.pem, *.key, id_rsa

  • terraform.tfstate, .terraform/

  • node_modules/, dist/






Why this matters



If a file is never tracked, it can never leak.






Important limitation



.gitignore does NOT protect secrets already committed.


If a secret entered Git history once, it is already exposed.









2. Native Git Pre-Commit Hooks






What this is



A pre-commit hook is a script that Git executes automatically before every commit.



Location:

.git/hooks/pre-commit






Why it matters




  • Runs locally on the developer machine

  • Instant feedback

  • Zero CI/CD cost

  • Stops mistakes before push






How Git decides




  • Exit code 0 → Commit allowed

  • Exit code ≠ 0 → Commit blocked



This is true shift-left security.









3. Native Pre-Commit Hook (Basic Example)



A simple pre-commit hook can block obvious secrets:




  • It inspects staged changes

  • Searches for risky patterns

  • Blocks the commit if found



This approach is useful for learning, but it is not enough for real security.









4. Blocking Secret Commits with Gitleaks (Pre-Commit)






Why Gitleaks



Simple regex checks are weak.

Gitleaks adds:




  • Entropy detection

  • Cloud provider key patterns

  • Token intelligence

  • Custom rules






What happens in practice




  • Hardcoded secrets → ❌ Commit blocked

  • Placeholders or env references → ✅ Commit allowed



Result:


Secrets never leave the developer laptop.



This is prevention, not detection.









5. Repository & History Scanning with Gitleaks






Why this is required



Pre-commit hooks protect future commits.

They do nothing for past mistakes.






Repository scanning finds:




  • Secrets already committed

  • Old credentials in history

  • Legacy leaks



This step is critical for:




  • Existing repositories

  • Compliance

  • Security cleanup









6. Gitleaks in CI/CD Pipelines






Role of CI/CD



CI/CD is enforcement, not prevention.






What CI does




  • Scans code on push / pull request

  • Fails the pipeline if secrets are detected

  • Blocks merges automatically



This applies to:




  • GitHub Actions

  • GitLab CI

  • Jenkins



If CI fails, the code does not move forward.









7. Branch Protection Rules



Without branch protection, CI security checks are useless.






Mandatory rules




  • No direct push to main

  • Pull requests required

  • Required status checks

  • No force push



Security without enforcement is just documentation.









8. RBAC — Least Privilege Access



Security is also who can do what.






  • Developer → Create PR only

  • Maintainer → Merge PRs

  • Admin → Repository settings

  • Auditor → Read-only access



Reducing access reduces blast radius.









9. Mandatory Reviews and CODEOWNERS






Why reviews matter



Secrets often leak during:




  • Debugging

  • Infrastructure changes

  • CI/CD edits






CODEOWNERS



Automatically assigns reviewers for sensitive areas like:




  • CI pipelines

  • Infrastructure

  • Security configs



This makes security reviews default, not optional.









10. Dependabot — Supply Chain Security



Dependencies become vulnerable over time.



Dependabot:




  • Scans dependencies

  • Creates update pull requests

  • Reduces CVE exposure automatically



Supply chain security is part of DevSecOps.









Final Takeaway



DevSecOps for Git is not a single tool.



It is a layered system:




  • Prevent → Pre-commit hooks

  • Detect → Gitleaks scanning

  • Enforce → CI/CD + branch protection

  • Control → RBAC + mandatory reviews



If security starts after CI/CD, it’s already too late.



Security must start at git commit time.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten DevSecOps for Git: Security Starts at Commit Time

Thematisch verwandte Begriffe: DevSecOps, Security, Starts, Commit · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-97150 | When converting baserCMS4-style addons to baserCMS5-style ones, BcAddon…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag