Download devsecops/devsecops__devsecops-realtime-scenarios.json from adityabhushannagar/cyber-security-clone: direct link, hf CLI and curl.
- Browser
- Download file 3.72 kB
-
https://huggingface.co/datasets/adityabhushannagar/cyber-security-clone/resolve/main/devsecops/devsecops__devsecops-realtime-scenarios.json
- Command line
-
hf download hf://datasets/adityabhushannagar/cyber-security-clone/devsecops/devsecops__devsecops-realtime-scenarios.json
-
curl -L -o devsecops__devsecops-realtime-scenarios.json https://huggingface.co/datasets/adityabhushannagar/cyber-security-clone/resolve/main/devsecops/devsecops__devsecops-realtime-scenarios.json
3.72 kB
| [ | |
| { | |
| "id": "devsecops-001", | |
| "scenario": "A DevSecOps engineer discovers secrets exposed in a GitHub repository during a security scan.", | |
| "instruction": "Analyze the following secret exposure incident and provide remediation steps.", | |
| "input": "Repository: examplecorp/web-application\nBranch: main\nCommit: a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0\nDate: 2026-05-30\n\nTruffleHog scan results:\n\nFound 7 verified secrets in 3 files:\n\n1. .env\n - AWS_ACCESS_KEY_ID: AKIA...\n - AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\n - DATABASE_URL: postgresql://admin:Password123!@db.internal:5432/production\n\n2. config/database.yml\n - password: ProductionDB2026!\n - host: db.internal\n\n3. deploy/deploy.sh\n - DEPLOY_TOKEN: glpat-xxxxxxxxxxxxxxxxxxxx\n - KUBECONFIG: base64encodedconfig\n\nGitHub Actions workflow exposure:\n- name: Deploy\n env:\n AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} # Properly masked\n DEPLOY_TOKEN: glpat-xxxxxxxxxxxxxxxxxxxx # Hardcoded!\n\nGit history shows:\n- Secret added in commit: a1b2c3d\n- Author: developer@examplecorp.com\n- Date: 2026-05-15\n- 47 commits since exposure\n\nImpact assessment:\n- AWS account accessible\n- Production database accessible\n- CI/CD pipeline accessible\n- Kubernetes cluster accessible", | |
| "output": "## Secret Exposure Incident\n\n### Incident Summary\n- **Type**: Secret Exposure\n- **Location**: GitHub repository\n- **Secrets Found**: 7\n- **Severity**: CRITICAL\n\n### Exposed Secrets\n\n#### 1. AWS Credentials\n```\nAWS_ACCESS_KEY_ID: AKIA...\nAWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\nRisk: Full AWS account access\n```\n\n#### 2. Database Credentials\n```\nDATABASE_URL: postgresql://admin:Password123!@db.internal:5432/production\npassword: ProductionDB2026!\nRisk: Production database access\n```\n\n#### 3. CI/CD Tokens\n```\nDEPLOY_TOKEN: glpat-xxxxxxxxxxxxxxxxxxxx\nKUBECONFIG: base64encodedconfig\nRisk: Pipeline and cluster compromise\n```\n\n### Immediate Actions\n\n#### 1. Rotate All Secrets\n```bash\n# AWS\naws iam create-access-key --user-name deploy\naws iam delete-access-key --user-name deploy --access-key-id AKIA...\n\n# Database\nALTER USER admin WITH PASSWORD 'new_secure_password';\n\n# GitLab\n# Revoke and regenerate deploy token\n\n# Kubernetes\n# Regenerate kubeconfig\n```\n\n#### 2. Remove from Git History\n```bash\n# Using BFG Repo-Cleaner\njava -jar bfg.jar --delete-files .env\njava -jar bfg.jar --replace-text passwords.txt\n\n# Force push\ngit reflog expire --expire=now --all\ngit gc --prune=now --aggressive\ngit push --force\n```\n\n#### 3. Audit Access\n```\n- Review CloudTrail logs\n- Check database audit logs\n- Review CI/CD pipeline logs\n- Check Kubernetes audit logs\n```\n\n### Prevention\n\n#### 1. Pre-commit Hooks\n```yaml\n# .pre-commit-config.yaml\nrepos:\n - repo: https://github.com/trufflesecurity/trufflehog\n rev: v3.0.0\n hooks:\n - id: trufflehog\n```\n\n#### 2. GitHub Secret Scanning\n```yaml\n# Enable in repository settings\n# Settings > Code security and analysis > Secret scanning\n```\n\n#### 3. Environment Variables\n```yaml\n# Use GitHub Secrets\nenv:\n AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}\n```\n\n### IOCs\n```\nRepository: examplecorp/web-application\nCommit: a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0\nAuthor: developer@examplecorp.com\nExposure duration: 15 days\n```\n\n### Tools\n- TruffleHog\n- GitLeaks\n- BFG Repo-Cleaner\n- detect-secrets", | |
| "metadata": { | |
| "category": "devsecops", | |
| "incident_type": "secret-exposure", | |
| "tools": ["TruffleHog", "GitLeaks", "BFG"], | |
| "severity": "critical", | |
| "technique": "secret-scanning" | |
| } | |
| } | |
| ] | |