{"id": "hard_safe_test_code_00000", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00001", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_eef8eeed007415b60638e6e0\"\n-SENDGRID_KEY = \"SG.XqExx5Ir/QCiVa4ThsiAvc.Q89+hFFRiWXzUV0i9Yiw\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00002", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00003", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_0d69074169b2414ba67c1b93\"\n-SENDGRID_KEY = \"SG.2Ojhzrmjbm3yHS+oBdBdhx.8Tp5laQusrMBqFvhQRXi\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00004", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:VxXHxPny4iVhL6PmT7eIvU/mUcmJq426+5CT6eA7GbMS,iv:icKYSVzR3+kWyXzr,tag:lknS4YDTHtoTJkcpcj47rY]\n db_pass: ENC[AES256_GCM,data:Pp0IawMxfTJUANud00o9l+I+XXgVyP3O,iv:J0orLZWjoUx5fll3,tag:mFUPbklzMeep6+gHUZMyb0]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00005", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00006", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00007", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_c4f9c0c8dd12ced473848008\"\n-SENDGRID_KEY = \"SG.g4Aaooyws6RRT5F/o9sevx.7fcjBvlB5RNs4rFxq6ZY\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00008", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00009", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00010", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:jCY+0hBUjuiXwFE+MOi86yJIFIofTHXZofxn2xEih6x2,iv:XiD1J7AnoVhSjUSB,tag:dgLEMkjjpa1AWEiH8EUCPa]\n db_pass: ENC[AES256_GCM,data:hdPMlkzB8DTqKto7rfy8Vzdz0+MeSEPz,iv:ydxBrgxXvpkgna6m,tag:m7pfKc/Edft+W9GuzwiRv5]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00011", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00012", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00013", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00014", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00015", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAL2sjD4fT4ZPXk9HUP7vYvx2B5XynNejOFZj3J+Yf\ngu7krxflXqEq4PihKc2z26ix28xRGq4RNPVp0a2skzeyDfDP5DfU67Xmvu/FSErc\njEOucMy7xBEd38RrOfeztT3HQq1f5vWkwAESkSwSyaYMeQNu/8VVujDj3h+AHaC1\niC+gn+AIkyw8+Ka0b5G3SPDAwIHWhlBl\n=MIy2\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00016", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00017", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysS85gf1fb7gVNIOGZQ2nXJh28wYD6PYz8YGrQt56R' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tna6cbY1HVukKBJzNzd7B8yUzukoTihKzW61kufbaX' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00018", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00019", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00020", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00021", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00022", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00023", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00024", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAOXlPom1UZyqdfjb/3h7hjqle26ngYAFOnA4OCkt5\nQO2hvw/MaHqhMIHWnx5bifSirmfTPDZB87qm2T9gYLknUBCMrugymw50C49qAM48\nHzhZBlpnxjuaSTnKuoesnnJT8ZQKPRB0mdFcrhCMLpbbYKaDi9cIHvbE1AtuwfXF\ndt+FP618go0i/3UofUZ0IaSd4cdtqSYy\n=S7Lh\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00025", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:3W49AChHKQ+uUoqsfJ3QVne+dan0mgnLH2WtDjG6ox+3,iv:GXmrkt3Pj4Vp5lbQ,tag:Cq7fBjGGdrgPUBszMHFBRP]\n db_pass: ENC[AES256_GCM,data:9odcregoNTzgU4rnYwsMUgGSEt6puel5,iv:jaEvlqeR2M+LFph0,tag:K/1HkjgtVCV/qFxawT5X25]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00026", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAhRUb+2QjFpV+xVm9O94R5C9HqR4zA/tcHvNBD9Ys\n+FRDj9NQtsZacsLdtBQaqws2QXjfr/mLfoEwZOB9gqttKRuLRmiJtfKOIy4BiCu7\nTDBAAbJ9AWNtpGiIKsWzzaZ3Ddd1PvgsEvdVRVdnjVFoR2tt/aFShaMhgnE1Cdhz\n+01I0R2NBOl0QkVIEsQ9FQzSgABbDKat\n=P5Nc\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00027", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:9DUr+w2GwTyePwUvTYrWtz6PyEQK7XHiu9wNzc2kgg7E,iv:W+ZUp5l5WAeNh2eW,tag:M17uSy/KmqCsmk0ZmLOQnZ]\n db_pass: ENC[AES256_GCM,data:5xAIelU6PF1KEwNJieByefYthoMvo87q,iv:Te39eK27GzdShE6q,tag:bvqvWiJU7Q4pe85SWc+8MN]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00028", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00029", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMA8rccGPBt2+bdXZI3RVJdXSBBiC5+xmBdoLoV4YK/\naU0eilcwPpsMEheqIFVw6oT8XsPHrSGd5TNrni+oVnx0j+SPDhFcry0frNF3ycnl\nBdtIwbM576ZLWv1BBUVdgyUR28DKKHkyV7iaZ8fpIvzNxQYZMhKuqlDCD9E2nd8r\nNuelXr3iOjNdhcR3LcTdTqqR2wTMweCG\n=pux0\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00030", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00031", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00032", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00033", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysjuYvAPE+Nkc76bMZGXGLwn1cUy/fe7oGKJAU2HdE' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnHCr1sppXxDVhpU4xwG6PMCAK0iIXALiqsufA+KOX' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00034", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00035", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAahqJ7VicBS/i365wzJTh55LN/cVwCAC1sEilX67f\n5LxPyCGL8gtvK5L2Buulj0V/nHKNgshrC4s6/W7Qjn1Wb59IZa1bn8KUH1shT2CB\nq3/UhwfYUuGrOGXTu7B7Yu1Q4cOaiy8Rqj0Usm482VaeJnlAqyLOEQltosFYzwEg\nh4Ws+uQhDuhSTXEZFApsG4YdXquzCz6r\n=Uv0t\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00036", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00037", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_923af9590bc1bec8a85328d3\"\n-SENDGRID_KEY = \"SG.Z6vnU8cb8gzFktoXprhYPi.VrfeUWAa1MjVYmMtuGbr\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00038", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_1f9663644b86fbfcb790c771\"\n-SENDGRID_KEY = \"SG.tjOfJn8Lfz1H1WdFAV1cSM.3rnJFF9pDEJVU6BeiaHh\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00039", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_7f062c7b86464ea895a2839b\"\n-SENDGRID_KEY = \"SG.HqD77U2iH1aAje+tmSIvdD.kwJoO7r03LtNzqIQejUr\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00040", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysKiHPyK2M9VN6naon7NjEae+iZBEtWpzXTw1ufMnk' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnOrjBCSqh5Pl32XwBN46mx7/mxmLv66GarPPz/Trd' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00041", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00042", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMA/OFE3WZcb5jV3iA2dOdgI+mNb12uT5L8H8z1Qe0G\nUfCrmGlV1arwvKSKDhfUlL9XYnxfUp1P5mWidTliuom4lsSqFLwPCO1c1yInSwZY\nnSG1YfXqDchQliLxyLcSO3aAvPg6tDlbZDKBz1qxvRt+4W5GAX9zbG7498m+Wiv9\n+tXZDkaj4tfpnfpR2xEwERS6Q1TWgiWi\n=X50U\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00043", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00044", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00045", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00046", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:FVLoMXxv0NW6PimnBvPBsy0c9AkR1DfRg3ZauKyDF9zX,iv:tqOMZCxEvIxY+IyR,tag:jv7Lm0UDdshFx4Rqvs0Ilw]\n db_pass: ENC[AES256_GCM,data:buOMwcVpfgUOBr+Sp01UHDexj+O4y+f7,iv:VBb8qP41BhmqtG2p,tag:ZxEWBVXrQM6RrAbAirM+uo]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00047", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00048", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:oNUMDAMIEJvu0j2FIkyzQKfF/fVHtWCDjLNKAWWsV/yI,iv:y8hznhs3X/+Jwn5r,tag:XOQROOGIozWs7k3za1WPRg]\n db_pass: ENC[AES256_GCM,data:LAAmboNGfKAbNkOR8bMYyGm6DUpETmie,iv:bKDRCplDPZ136pUe,tag:VRAHEyY94ITM/TC0dZ1Ucz]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00049", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMABhjq0WhkAv6YngPe5FpqsCYSKMWjsoxxs8kOECsV\nSjsyObntLqUV/zNkwj2ux3FkHl5a8vtorXYPwD6612YHomQzgveJIV3+dKpqVSPp\nSDcMJfm1e5HdoLLDIYuOmhfmInFKL3h4XmZNDaWMFlGG8t3prJtC+8Fu+EkeBt7C\nOIlXWnGuHgtNKjkXY2Nk9+PYXr7E2tjv\n=wVCB\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00050", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00051", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00052", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00053", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00054", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00055", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00056", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:PiDr0mQq1bByJVZNCrekU8L88Xy9Tp/LddvICsE4e+U0,iv:3LKJCuIQJ0SiX3SV,tag:9xXVnuoxm+qM7iPBZZ1d/x]\n db_pass: ENC[AES256_GCM,data:K/93uIsveefJhkG2KDPmeR0D4/jvlKDX,iv:V84zsNyauj2LXIPm,tag:075TKmjtgI8ciwe37Qmk/o]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00057", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_c0ef1f0dd3073c91f89823fb\"\n-SENDGRID_KEY = \"SG.w/AnfGEG8byA9gxte8PoSP.Z4b9U5c2laHiEcMnVsN0\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00058", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00059", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00060", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00061", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00062", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00063", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:4hkFtO6quYv4c36cyMHka5f/hE+2IiMOtE5iQxNTEV2m,iv:oi8ofgz4golQv+QH,tag:K4WiBQL7c5ydmljcYkuKEw]\n db_pass: ENC[AES256_GCM,data:O0KCnNIhrX7v5qZFJQQvHexP9ioDhJs3,iv:tB+f3Gz8/m1obUwM,tag:j3HZxo8HxgkON1Wj8N2r98]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00064", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysyHAEuUteTQnUMeWiEk+++zkALpwo8izULRnjruOH' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnHXMoC0INj4WU48c1qOBkT3FsHfU93p2FSBdgX1U5' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00065", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:A1+fgZpFLQgXTJ1yH7yMLY9KhWxR5AzVwY2KH80OXQbK,iv:b8g6ZU2q0w+pCdD/,tag:qYnXJuzw022vNV1o1gUOuF]\n db_pass: ENC[AES256_GCM,data:lyqTwZ5W9uhL6SJWIzSmfM4zqTIz6g90,iv:4sKf/CcJQrF1+poP,tag:napbN1AJKA2LO4+VT+Zqx5]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00066", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_55f2df382fc875c9bba8f790\"\n-SENDGRID_KEY = \"SG.NFB9kJJdw3jReUK8UTFT8/.nCIRvK48jIRuaNTwh+NH\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00067", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00068", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_39c22a711f9f66b2515be726\"\n-SENDGRID_KEY = \"SG.o/OvWHbM+dxk9Hayb5K29m.Nlnw36MK5T4lj0bcI98Z\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00069", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ys7gRLkgmjNvDQ1Y8Qepj9FYcd+E1QWL2fP6KSHWPs' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TniWsOzyFFuEyFYsRd1mf5VKludb9ywI0RBG2GRcnD' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00070", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00071", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_b133a0e3be03ddffd5d023ae\"\n-SENDGRID_KEY = \"SG.BK3On4VrSAAr50FMOzSCQo.Oh5Flu8qR7zIsKgh048J\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00072", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAmHcEhcyfSeBxVCXQG+XUcaj3qlD5dy8GoOvUbC1M\nskJuheHbUUuc5RaadyK2WcIb0EKyRy6pFq+OE5D4osU9yqkVBtcA42/iOnz4DC8D\nvQiHpTK8UYxD3YxtzEIC593Amv4Q7B8bnKl+RXPKZjupVWFNWHOcgeb63vf7wV9t\neNu5CvltZk4kh6AJOSr2ph86gc4EEXL/\n=xCKC\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00073", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00074", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMA8K4/4eitzj/YQ9uT8fMZb5Ak2mrH6F5dptCBcVWD\nfJi+NVby5ycRSvZ2YAv8UJFr66fQuGhZZgexjZX3aaZ3NjO3D3YghTmVff8aYodf\nuHEm/MlsR3dlalmjI+SSelu/kOLMGsB0VHP9qWeewUN0fWTaVfL6xRReq1CVEFWu\n/mLcwDD72+D5CjWAbiu/OzaYQlLlgzjv\n=bzt9\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00075", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysoFUB8k+d9euEsp8ZAatkORBhisUZ3x+eCAnuo3u6' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tn+YJKvmiuO+oLp0FEbGgWNfFM59rCXYrj2dpOu0Ej' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00076", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ys9Fu4mZm7Msd4HGpyS2tnsbPAxX/CykCu7DmMsLub' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnduEj1ybBulNWPuWcGUTF7igkTfxwfvezdAYSJfnk' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00077", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysodRbPSEcW89iuyOzGsbTAemcoFwf4G1zjaONrxy1' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnWqm5zPCC9QXnhyg7nWVtSnLtDPo41nba13n8yu+M' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00078", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00079", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAEMYQ8egabdaraCU9gxP+VxrPtchjD7+6hO8Y47lh\nUD4SrbKeSnzycBDla5Q94TUmrQ9mSZ/cK2JSYTVsfx0Ix5UIuOALx+XjR4RA9fqi\n7PCIR4v6+jvOV2K+Y0z04/IHKqJ8VRYFu1x7H0owAWgOD15maYGgje8pz0Ig0bbh\nlXeq8BwzStynBLENcFcubS3yIgSNw+Fb\n=cF5E\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00080", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00081", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00082", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_bbe7b3f04cd3602dce787b6e\"\n-SENDGRID_KEY = \"SG.PdLSF5sksvhj1mFaXZ5Xcl.vR2oCS6giV8KCxSbHSOg\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00083", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAcBSef4QEGp7ibflmQIJE+QLhcmtVzxGaHrHtZupE\nnQEnlJO2eQ2jWE/ekOAO80AWcuzmUxC1o6E8GA3OpHFeMAJTXXcrrP/v1M62EFW1\nLJRMYivS+INeO73Mo7upm+mvRrMQmNYZSmRTJnDHhUspMOv4ZxzT7DvqehyJzeZq\nF7J0GAr+OFgBuihW/cegIigVBcQdh+Us\n=poMW\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00084", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:1jJuoZ0nN9fV+rFg2oDklogptLMyngfTCVyNyIr4FYHu,iv:FN1MxTMSyYnuzpso,tag:MEb7pSCZywyFU6fqox/Ek2]\n db_pass: ENC[AES256_GCM,data:PMZ2+xWf6fSdf7Cs2r6otHofdPY98lJ8,iv:5pZmTeg0lhDWUj7p,tag:a2XGbGdidji31KrplhpOWe]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00085", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00086", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00087", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00088", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysDZRzIzH98wMTVWHAGFZnMxtMAyxumbBOj3YVPtpb' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnoCFDD4DAd857sdDyPBMwGE73Ewm7k/jTrbnHbzZD' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00089", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:sdHhCFWcXUKe97yQCUrj6fyzct9mKA0jJq6ae2qEeD+7,iv:FfD5N+29qJ40vQHQ,tag:1LRZXp0Br8t+/dLZq0J2o9]\n db_pass: ENC[AES256_GCM,data:DjgIxVAvfkE7eu4B0jEb8hp4F9Lz2sNk,iv:kuyffYaIFf+ZP/al,tag:i+xR0wKc5vcL/N0mkz/gLN]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00090", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00091", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysiD2kXGFoszvkEC8tP0A7Y2QnDTcd4j/iUsvupEA7' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnQQUtT5Pxzwd1Zy0D9Y3C0VTQ9W3l3kqf4vciGFrm' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00092", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00093", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00094", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00095", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00096", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:TZxaE0GnvQVGH4/NNB8ZDUJIWcvAOYE476MouLCtPco5,iv:qqHc8CzB9Zr0IAG8,tag:YOtMd/nQshp/JvImRfP8bi]\n db_pass: ENC[AES256_GCM,data:VqQQA5nkg7tIJe+32apXY89hChXXDhQr,iv:fYwym8U6N+X/kvHS,tag:m/WwvyWgGZnmOXVe/oQ6FX]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00097", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00098", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:PmcCaw/7PA1+3f1MJhiF/UvNc1ut0s2dt9iqyjvAeHet,iv:tb+uT37M2xgqv4ln,tag:Zor1JI2ZJKStJt5Wc6AQrd]\n db_pass: ENC[AES256_GCM,data:e8LgEExIqLJYfkPK3ObnTk93G/aHrYXm,iv:JdnQmHwzL6sp2hAP,tag:F+zmqilPhQic/VURin9KPT]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00099", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00100", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00101", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00102", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:njUY3uAQRCmOnw32QF8BqBkY1VHnhsslXEWeDtom319r,iv:ECiXPy/JPjrxqg3H,tag:tze9g5qp972K76O+a9uSJK]\n db_pass: ENC[AES256_GCM,data:amgtWqZLOQ9KwyN4u2wWIFBJSg5o3nA/,iv:eR+CiVngq6A/P45f,tag:7NfqMV8pErkWU7F/Y4gGoK]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00103", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00104", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00105", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:7WJkV+KQm0ocl0msdCNcUUxWW1BS1kykcl1AfkeABSkT,iv:T4H5L9LvC1MQnCl1,tag:CuM7Z1msXDfLYidVI2JzPT]\n db_pass: ENC[AES256_GCM,data:0dl4Zpd2IeIfHfqJ0cF1iYSfjCBOfWDR,iv:/vcabQbZbuWZLfm8,tag:gYIxYVMU/uRYGsskIjQIsH]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00106", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00107", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00108", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00109", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysGYuEGDcdQ4yOfUrjyhAZG/xdtkKUJcEApMNDw/XX' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tn82HidZ73qH46VqU9PJE4pmTmPzpRjzRUHPQttb4W' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00110", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00111", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:U2Bg9qDcy8Ok8xs3lYUxIlm3UQEtY3G9H6bogpSH1rUi,iv:NSRvsO/snn+0mHL4,tag:hUZZfTDD4hd+pfRFiP/cAc]\n db_pass: ENC[AES256_GCM,data:efWWF9/g92XUHa6nbZLvAJ1HaSvOFU0M,iv:9664RzNw4eMZ3OKg,tag:soHvbi/m0knMjprveqcVUi]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00112", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00113", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00114", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:OXvFzBYcShiXbcm/Hny4f3bjDuVgln5w0GlKF2BJ5N+1,iv:s9htJY/Xvp36VHAn,tag:PNhgxSb0G/LesK7TCqZzMK]\n db_pass: ENC[AES256_GCM,data:8ANZ3Q1PWVRW2fHjYLOKjKsX4KY294g1,iv:ZoXXBK9dNbJjODA5,tag:PlnJ/oMuQ6P5HQJb0sawAQ]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00115", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00116", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00117", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:bZYzWIjQfJKwO7nJZg14XZuv7h1XzjLX2r521kWaQGM6,iv:y/h+ymfmN00b8ydP,tag:fOeVdAlOmLCAjUorbFCskT]\n db_pass: ENC[AES256_GCM,data:Ciz3QMwJf3U077+K7eXb7Rq+mDfi7w7m,iv:6zD7Dn/6RfkyoB0+,tag:uDI+ymC5ItLUkLd3sc0Bsd]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00118", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAnqgEgjDYQklakfF0IlOq7AKv1YRCW3o0phGI/AvK\nCVFSIOz7hEd3F5HZ3aWyjQkowRfz3xXICgqKUHXl+iK+W9JIRpNIY38i62Z8So1B\nUTq+PtM2NJefwOG9WcPf7pICEI+l7CyeNUQDNFI2KBF21iHm/cPuHzlOpdrb5x/y\nNRKbhrIXvxq7zLmw0sOOiIKrz33m977v\n=kfRu\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00119", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:U7l8y9k8oSvMRg38gTxbPH98JbuFR0omOhRGK7hEEdHT,iv:Lrc1ntuDuugUx40E,tag:2HpB2c9r2SPg8YcwDN8hLE]\n db_pass: ENC[AES256_GCM,data:dUiEri2H2wkivZZBduXGYCCtkFvvVQIv,iv:L9YuTNli969ZBvi2,tag:4cZxoPo9i440Z3eavcnOJl]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00120", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00121", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4yst2HyL/FF2/oCOC8PjaxGVkxn9HZlI0Vmemj1atfy' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnafpqkTDbkEHfDY5EuVxOEy38uNGXQD5JUzJlChEe' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00122", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_3cbeaffe52999befbca9a383\"\n-SENDGRID_KEY = \"SG.kPSpK5nJtAFPV4oZs8KqqZ.XNUlC03Clledp5DHFhF5\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00123", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:i88HibR+ixUUdmccWFZRDG3CRSU4QwpI7Z7Y0cb+pyfK,iv:YuDw393K7fXPk78V,tag:Qfmr3Gd06K/fRFMhzOUhk3]\n db_pass: ENC[AES256_GCM,data:79AWihXRhyg6cNcivVHCp7VnsmynalPQ,iv:tHjYlfbJzH73KuiM,tag:yb0m2/wyYZVa7TKwXL0XoD]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00124", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00125", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysm7JIyWi2qeVjjEdhNEJrkNCUfBLAi3H8gu8k4OaS' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tn3cdbx59KXCBYNxLXws18q1iZDacdhYhnZVAoCr8F' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00126", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00127", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00128", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00129", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00130", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:CjbU+TDmcCpDofd3xHrtZlTbKlIHwBBqbhamQ3mz06Cq,iv:Bz0fLH1SEc+zBtvL,tag:WYdLQhqbPLI8eTW2Orap/e]\n db_pass: ENC[AES256_GCM,data:YcNGZt107zM/OPmLR0yJsAygnsdErolu,iv:lV9QML6/CaT6kB/Q,tag:bDG0IkfdkQbZOg778ZpRWK]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00131", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMA55fCb1GLsQb0eIzqIkh84HVo++x7IdbIAuQ1lmKt\nzWQ7GF0rkQJGDWL/7EOrLoh5fLhBFJpFRZJoUwXDZZQzscMAO1yIU7BrGjCjvyk7\nLpOrIa99XrzSocB/zj/HMeb1fe/h5/pQ/Ok0nAoEAalp6uGzXS6x9WFqNBP3SrYA\n2EV57eHSMKIcI6az1jrCA2goulzyqBQN\n=6SLS\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00132", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAtGKS3uL+ZdhiMl2X/p74chEBUoMWJzAp+PgLuMya\nbPKZt+qd6/Rr53NBAuBk07u3FCIbC8X9mGMBpYqzyiOXvsgOMw7a7B2hjlWC9EQt\niuebfr+f620qZO/a5IgL+EFJmfK4w757riTY2OBjhknqV4vBSU3IDw0k+8liQSou\nqZ+rc8qPsDV32eim7/sIWUF8U+C5znQP\n=Rkkm\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00133", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00134", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00135", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00136", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAwaIZeY90qTmy/+uI1r5votc6SOge3CGGeB/rqQxq\ndI04SENCYgPP6UuPhI9GqIyNL/HX4WMt/ES1g1RqoZ3/I9TlinJoCHpYjhPJb6k4\nnl37TJnjchllaeHDycb1M36RThJ0myfdU5sup8LWYrYXJiuA+uRgaU/DW6a0rvVy\n1v5cB5yre5zx3TT58/aCuz06rNcNxJmA\n=mJyU\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00137", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00138", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00139", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00140", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAYHIJHOhHRPYebZBx2K5bMi8i4Ww2OK1la+Ja85xi\neDvu9DDTQisMYgR1JrML8Blj8vLCZ46qUri0wsF1uXi2j2x1TbUez75A8Dni2Elk\nJuUYafH80lSTpiAy77YxEdwJS8fK+N24g0flf4Vo0YdKmceBua9qS/fGYJusZjKD\nLK3Aiq9XAU9YGjEZZf5UeqcwJNolDs+Y\n=UCH4\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00141", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_5e60df6b793b448342c6fef4\"\n-SENDGRID_KEY = \"SG.6Ivd07TzCvf9kKUac75ucO.tb/go8/DGyMRjZTCyRlO\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00142", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00143", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:6u6r8R/5Ql5Y5w9a3WSduv376wZRLC4vCc1gCmiMdwVR,iv:P6Q1d+sRntUn5hri,tag:cncN+setNgoP4NlIwW6Rvc]\n db_pass: ENC[AES256_GCM,data:ycAF8abK86JeyCqX5/GSi4nm2tS/3bzD,iv:W2vakwaF/uizsDqL,tag:OQKXoovgaYKP51cpO9JAqa]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00144", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00145", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00146", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00147", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00148", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAoi7sR97DW/J+C23fLLBkc9pQ4Z4jxHeDDbMaCfwk\nTJlB9gYUkw6YH6URKBXGnxJfLuVSETgJcd/vpIZMnJy8GL5Zr9tdgGkWkdJNIO1o\nQjqrFrniVHhA9xMmaiOacnd7SoiTF2i4pTcXifvdqmR0wYo1Dw5gIiebkMA4RVEy\nM3kVHhYq1V0eykKZmhFGxJx116DW5yS7\n=fGzx\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00149", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysLXYtc9zmtXTKwtMkm2yB1f9qYQ6V8JuRgGG4cV8M' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnRgNAOU6TQKyoJZ4U9sD94Qxpp88cSeTxQFb+r3Xy' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00150", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysFYzTU/U86vm9BK/ryUXyZB5ilsbSav1N8G0lzjYx' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnytCh7a3rpXLhlh0dQqImYkAhX4nZCAQDg65bPUFH' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00151", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:6jhxJf7rkx+r5B5Zq2PRdFPkP0bHY40oCCKzumDh6PcW,iv:S007e7xPQcbj2lit,tag:uQ8hbt9Sh6WHOf/6mmNwjX]\n db_pass: ENC[AES256_GCM,data:lUMlU2YwU9w5QnpkOXCSmHMaxES51Yoo,iv:BG+Efd+clMYhGk2y,tag:gFjgP8+o9ROlf2Q1BTq3XE]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00152", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:Cqj+9++jkTbgMqjJQVj0/OlUwdl4/vxdy1OU3p2hdzYr,iv:0aQoJthJj4eXlQGs,tag:zKUQyurExqelOef+reXRvr]\n db_pass: ENC[AES256_GCM,data:KQKy/LCFZdZZbk+Qe3FiQjempT5NDKDc,iv:9EeB5oZ/lCyWDvKH,tag:NPApOnOK6SmMOytbGULvoj]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00153", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00154", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00155", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00156", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:1XFy/KD6ETaAJztQBzKL74f0ywSc2cAwSEcV+KN9ChOP,iv:iSonSLUlwkkAnt/2,tag:N6NJKvz7ABtvq57Vtqe5Nz]\n db_pass: ENC[AES256_GCM,data:7LWpT2rCo44qHRQJjdvAME7/QIXH2rpg,iv:a5KiShEcu5HmOYxE,tag:L2ipcrBt7jNK0jVwihUD23]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00157", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00158", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_55a70ff1931b83b631e803e3\"\n-SENDGRID_KEY = \"SG.A7VcptsqngtQTAVRQYIbJ5.8uTj3yLd4PP+CsDmcnuj\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00159", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:8k0NrzlWUWWmi/Noiiz/n4ooqDeSQBD7a2jENWu5drxd,iv:8loLX0kbr6YcID8Z,tag:ZZ6bDkkZs4d0U6q4DXg6PS]\n db_pass: ENC[AES256_GCM,data:uqgYM37dxII6jROv3ejMZLSyWsqGV8FO,iv:CXelifdH9cS+JZVd,tag:6+e23FSZ7MwLNqwMV5hgl5]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00160", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00161", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4yspJlb2jhlRRq4y96VaIm+sC5bGHGLvrbk3NyGwN3m' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnRFN5zOn8Muol6EYkwjA4wfZiPK7jse79XnjuWSzB' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00162", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAQZPlNsWlBeQNbQvmUoI2cK2o2ePlj8leVG6hxjBA\nFz5gLHqIy/W1RcyKG7CHpuuVyz8ztVMUnQhj7ZlmbSckqn+sFG4XShENjWLMNKHP\nGmVboBAVVTdwmkvImgucZr45JawS71NQKNdzSkDBpo2/n3NyY9nE5fvhOIZ0zzgB\ntXaejGk5TjR2Uo5DM2Hu8VSz5FgcWU0k\n=O7H2\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00163", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4yspeiM9h6SwLLIpSwFVbTUSyS0IWNw1iCtGK8vorBO' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnWV4LMCOjNB/tWKzbaYDRFJR2sr9mMGtAp1HOnUII' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00164", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00165", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysXIquYkOZ4uk1/kiDzsMd1lIqHXa4KmQcEQIpME1V' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tngw+pj9Y6dnRUWzL3MPb9wsJXmCI2/BKGEUbhEAPc' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00166", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00167", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_6e13e4f2907af8ed5402c1e9\"\n-SENDGRID_KEY = \"SG.BEuBl8lMvnOQCbFEyIRuMM.ug0ooa1+sUnk15dVzQ87\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00168", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00169", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMApXj+FBrPUNJTuulQk1i2ghGFNCd6HOxMqDroxnXt\n3U2s12hLS+Dq2McoGbmHA3em0HMl7GG4ZJwlImsJlRuhSA1nuoZYdG3wRmryfEV7\nLz7/o0iMqyYq5dLLbcdMvob51RvgfMQssPyVGHN81NDxk6xXFOKWiHhLleVDIQQO\neiHmM35D7WH6qvgr7BWk/+glnbHvBIXK\n=N/1f\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00170", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:K4bYQ31K21CKxj37LoYf1uGWWDVXQmRbVhpLa9I2/tPu,iv:hUcdH0Z2Tcu4tTne,tag:vSYFyz6fSGMKnpNTOI++1B]\n db_pass: ENC[AES256_GCM,data:x9CpP30pFlw4gszRciGpFD2IAXya6sHy,iv:qeTAcg/D8OnI06Aq,tag:+9cQIi+ajAB7GgORDHLLY7]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00171", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00172", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00173", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00174", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAzS3QM96KlI28GW3Ww2p1vVD2hrmPBJJhgy1rU1m8\nLW5GnEPwGUnsEaqoaa68wGOAbIzwY+7e23ofcPCirrbTFLTgnr/pJeNTt97jr8bU\nJjyq7Alx/1Yla1SRlgINctHgydaICPd7XcvYzZUexAIbvEudFi9KaZnDmXPkfn0K\nVEeyjhZq3TrAhFKJ/e1DtA+jot27ixfz\n=jl6r\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00175", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00176", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00177", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00178", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4yst0ZElNnlPwg7EfD0Ub+i80wIhcgKh9I7fZIzWsMI' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnAEB4+RiD/6GrDbVCQ++hcs2iBczVW7X8mMUimuoI' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00179", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00180", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysC8GhKHuBj2k/mURV3wv4WabJyYV/DLNaHXKfqzaL' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tn2fKVjpRmD1R8KDTcaYvI1f26B/ycbM1LroB4UpC7' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00181", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00182", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:fMPSvjKZjbOZQenWrACyKMs4rzCTgJrPbiX6SjioC7sa,iv:9zcw4FS5DYw+Ak7w,tag:DafN/JiSghAelOuKs3z4dM]\n db_pass: ENC[AES256_GCM,data:oqAdipjff46m5K/Oefb58TaVBu9XU+qy,iv:c4P5+AoOy9gfpxUZ,tag:+9t2qw9f/IkugR0QlCazAZ]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00183", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:7Y82re744AIG2YsDfkdnaA7ZtK/+iurndU4WJ8jvO1MW,iv:kqYbzSZPfhQNXIfj,tag:p2BtvLs3GleHLAbzqXwggc]\n db_pass: ENC[AES256_GCM,data:f0xmVfUpbTdN8B0pjTPGddk/mMJLM9fZ,iv:cat70pWFg0WJcV4W,tag:4j/wT+/UqLs+DH36Oe9vvk]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00184", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00185", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00186", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMA7JR1HaiDWTD8gbShN+j5R4L/qFhmvoCA35aZJRTx\nw3GaPQsZi49k0zc/MWJ2qQbZRwBSp26xV4juV150ya7nx+9PX5k2SSN3Ks2Goa6V\nMZ0uojxeExZJysTpQ73oJfu04rFq/F0LB9upvV6hIeCFZiLWFgxj2OWZDoyjYBV/\nXBDjwCbn0DxZWE/WEUnFtoblC01GuDld\n=KvXz\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00187", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00188", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00189", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAlHtcAqaPynEe1nvU9zAiMnHU1MAQbq6HzRlSXXqw\nbH1XEKV9u2BqamPuCVG4FvqBeTb1Hjlnz1Dndl8jgW11PFM9gkXk4xs1zJclgBLn\n2lblA9KJg+rRr1dI3C4W6Zf7CX4R8sml1l6yohZkrC+6aoKVWud4NN/uSoMiS/FI\nf5hywd+KBiBAzvk3Jt+LqVLbUGItaV/W\n=2bca\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00190", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00191", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00192", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00193", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00194", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00195", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00196", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:X84pcqKco5wmnakwcZ5Zw+h4ovvT5ozGJJSnmXmk2zkB,iv:aIwVIPh1YWf4dXWz,tag:6NN8hpFmEtxk6yM3PK5v/g]\n db_pass: ENC[AES256_GCM,data:izeoEoz82ruQG6qg5S4BCXbKkVIr3rmT,iv:eS3wurUiLgp1HC6D,tag:iD+xV3jfITqZu7YLV+tIFB]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00197", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00198", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_fec9f61df2784608ac583b2c\"\n-SENDGRID_KEY = \"SG.STEzlVrEQXx73OuxYzJl3a.glUQOk4tlALqla2kk7fK\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00199", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00200", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00201", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00202", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00203", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00204", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00205", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAcAa650dLBlEscTNdWKpWIlk1f8o2SAbHDQurhRA1\nEBisTTwauDmBCBjoh+4YhPYqT9t8Tyr0hVDDQyx85WBSYMl+04ZE2gJbf2NKlSck\nJCrrXkrBvm0KCWawsIVyWAKrDmBTea9Mo3OuVrfUpXM1cXEeRdFPAgoG6qndUfW1\n9wA52i4Wz75YxtSH0VK8jESKhXtcD1Jb\n=+xWB\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00206", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:5oprBGnzPQbzS4h7llA26PXNXCPBnWRZcEnAt0SS3GEz,iv:Vu/ubQti1SdPJWWI,tag:zUbzldeWK95amZLXGNRKIk]\n db_pass: ENC[AES256_GCM,data:hjS9XXofV7I0tqzsbTLRQ+fX9t/MbsXN,iv:AbylN0CaqMk/o6Vr,tag:YZSYS0eUhE3aO9roh4H3W6]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00207", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00208", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00209", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ys4LUj2GvmCcE7+AtCdbOcO32DzHMAl3stHWb2DHQ9' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tn8lPOfAa7RU4yhZziJH1phdWl7m5qruMOlq/R45fa' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00210", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysZ7jk4nML8joxaJrC07dNPCiWpu25twoWqWS0YXrb' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnpzS15Ih3K/px8zjmiByZMNHsext092QlV8lHl9Ki' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00211", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00212", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00213", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00214", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00215", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMA8KAmwNL4M0LVYUpuJE+JDFNxXahqlH3qMpuMV+Mj\niaaetPQDz1U89tPocs7etbHKu51EcNBuQtVQSsaNTjHo1b7/B8g8JNi880I+0P2z\niaExOaNA7BvEWPU9s2tYtqTu9QEN2gdFmkF+dAWWlcS1VLULHmDmUZ2t2sMXFbVI\n3Xue9a1AeWeEc6JXwEpQ3LfwmqMeYGwI\n=fVg5\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00216", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAqTNQpQ6dFEdap1at5hrbWMYIlZbnyXXVcG6Iz8OS\nbCIjuMv+ySTnnpUidm/t2GGdXBcUME+McRhSf10O+3fm2jygvrvdkzlhMzsDR/ju\nMEaErTsU9dI5X65fWsV0KUKAYZ/iApSK7x+iyVtiFJCnyzv0zczBacU4fOraIh3L\nL/dVOjiMvSXDxDMohPlzdTBi9w0FsuZ+\n=LiuV\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00217", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysS7ofJOhJyOHs1sv+kkYxhNdSypZgAiIbaCOW5ziw' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tn/xxe9ReoU8BZudHKxltnLtKdyqVnRu86LuDKVW7O' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00218", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00219", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00220", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ys2znv4JmuMqQDJaRdlpVEEUIpaPKkMBpm0SMEYiK3' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tnsc36uW075DNLlkEp7kU3PcplKq/eNoZHsntQMH4a' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00221", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAvuf1Siy6CBSNm9ha1Y/njXBOX6FDn8AUScz7UbZa\nJdycNkGtOf0OYtd5rR3EWGBAx71Bk1pzZQw2Zz9qAeKrMPnHnLXRV1T1MeMTBLNu\nu3MZn0XBnioL5ggTL7IPQ6vs7obSlCV/4imLH68t07kzDGF2XH6iCPPdQ+sydS/m\nUKxtVKI3rbRGRNKYmRpaN6jzh1d4Ayig\n=u5UR\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00222", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00223", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysvQHzuW4w/lErayCHZZ2sdeyqglqteGN7aZ1mAIBG' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnouEcebpm4t7jnPdcSUIVo+XrerLLBeMM3654ir/J' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00224", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00225", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_5984e75cc7ff05af9ae9a82f\"\n-SENDGRID_KEY = \"SG.aTqj32Z+wH+iHN3D2joKCD.sBxx8Qe5V/RUmGWiMYHz\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00226", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysgApXk5bPUyNrD1sHg+maz1n96ffZ7ZfIjX400KAJ' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tn177pDjPhN8bjkE0dTY+urZIOd4rDCuqOCFuLe03I' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00227", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00228", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAVDeLuMJtGMTyzJGJCnbjbEfpzghOQb2VJZg7PIP2\nYgX0b0azT2M3dLoXLjJ5o5G7Bt56puAuGAHUo+vSaFpgkZ5nuvc2uRcifEM4or0q\nt+Igee48PSW7+Y2mICuW0XMVLC3NI3jOtXrBsAEZbWoXUBtbB8NEWGnhLFC6MTjC\ngzJVTi1vxTtk0oty/xJOqpBy86tY2TyU\n=wOws\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00229", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00230", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAr77heaakkGgKe1s/oW1Qy4TqJSZsViZ3IsOpm7ZB\n2w7bULTlJmyDMyABeiuzpl8cY1iSoNIe/U+J5FNbECejt0hsNnXwD26Bt3ydJpWy\neLWVP5OwWOFC2qfMb796JalZvU+1YrsR4zjIIKtW9e7rUSxELmwhSLHD0niSsLsC\nPBGdHxdgSEptLu8qBIkgZFJJgNzHBiW1\n=AJ1j\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00231", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00232", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_3c1f2b0020f65afe05d2b1c0\"\n-SENDGRID_KEY = \"SG.AcuqVKb+z5nVjiic/o+iQd.yPgQNceWqtogolly+YkU\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00233", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysv3RvnlzXtCYlLBmldZ8pWOE50rKOxN1w1fS/+z0K' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TneF59xpOd6AgE/ozLxsC/rWBuonLS7iOXJvps4T/F' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00234", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00235", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysgEkDP78VJor8sJGBQbYzIsEONWWYeg3RGg5GmDbb' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnZEyEk1agIBEJTJiUKh++zmXYClP1V/OySwz6mgi7' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00236", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysazKGQ/hPSysDNCRA4ovMc9gwXbzTKrLWforrEQ1Q' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnnRIgcKZqU93FneqIgasPLQXdt5k6jJ427zIc94Mp' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00237", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00238", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00239", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_4ee44205107f1de1e61c1b17\"\n-SENDGRID_KEY = \"SG.niTLt2bi5Qa+HZffiI2tiF.SXM+EGFsBMpYf6FNh/hK\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00240", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4yskPhsdTfvvAQ9leJ0v/lPV5aOsUeTLMNH6wysK8od' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnxLOUBwQzxXsj/CUDyiPzbyabcs/6ho/yP93qYGXg' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00241", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00242", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00243", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00244", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00245", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00246", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ys/ZgijEkGhwYkoJlJsIE3HwMMcrcWrMhxYT7wb2Xm' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tn987kPL7a7sO7xF+MDpiI2btN6TvtN3iWWgPsJZs4' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00247", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00248", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00249", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00250", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00251", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_035f8b0f79123abb4e3b90d8\"\n-SENDGRID_KEY = \"SG.96YLtXIrKV1MBOSwjMIaed.vDoWx5fuCfoQeLJiobrE\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00252", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00253", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00254", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00255", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysrD13lZZIRpjqnGXrDihvp3MuvD2LblFZarxd/nQN' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnvMw72uIZHor6iBl4NfkF8M1bfD7lhRL5yn21z/0W' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00256", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_13208f520191335391000ba6\"\n-SENDGRID_KEY = \"SG.ylvTRSeVwMaC/ZjaYwZnVf.yODYXsyCspaVN8wRSgfC\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00257", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMABABdlE5AiYkfSuJAeUdiehEJ7bOEBvimFILei0Hs\nGA6fsjtbbVDv6KI6jpSnqwQGyNiE9TgQmRAK4vnHcgr30ZkBsB343xZF/uw96F1R\nuWN+qCsBk0KT1bAiaAiKuIvh0dAiCAFMoubCXq43eKt3Q5lYsFJ27SUa6+UD4x3s\nPDnPHfCR8/jpCUjdKTuTzzUamOQ2YZBa\n=eiYj\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00258", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00259", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysGryq9InWBCKbYk+IzUOSy2Oq654Mb/6rTd3jNWfK' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnndP4agvzEYHSTd4nHGOUcqesrez5vR1mOgGntuGm' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00260", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00261", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00262", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00263", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:yCF0Jc9MjD6g5HJTEgfx7BZ+hKE1CLTmmAEcub+IxqPe,iv:wuTIp8/LLWkkzjDX,tag:EJev07BF3a3mjGn5DEyLZo]\n db_pass: ENC[AES256_GCM,data:uOZTkiH8B9aI08a67iUaD1JTkEEDVWhW,iv:suSEGyaMa6jdj2js,tag:snRdVE0Q/gN7TBhLOgxNwz]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00264", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAAcNRHpsrbTj718/yTmDmSifeq+TDxsQAWvYLf8cS\ncz1jaGiwKnqDvDJ2osGnFflszK0y+T7/ys1Zbn88S0AxXjzv2LkUQscc4RjIQfQy\nbfbXr0Fh9mdPU/uAPnMW5ZfdULHMpJHUZt09lP8v8eI8WNdVdqoCBpAk6bYf/RBe\n23KX5+X236o/3f+R8RVaNFmCG+gLhtQM\n=EA3P\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00265", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00266", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00267", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMABSgFz5QI9ApI5QbUzXODzLlBC1GKSCz8/ul6M5IM\nDLpuIivEDB+1yb16xVbbeT7hC5XvJme0L8wzZICP1tBdPXaMqMOHC1FO/OPXLbg4\nvaPzOFkWbQMjlomM0ObkcYFm8ZY5PBqZCp8VsbZFYfPrzQM5R6qUIFnPqxqUrP5+\nQA7GQ3GYJ2Q7P8O21n+1HpbQDxE75sk4\n=AZJQ\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00268", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4yst3U/S3cbUtZxUMIzk0dml/MmcDoV62LrYwORp7ei' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnJwwRSOtvQ9gnoe6MXRR0WN1vfU5hpwb/kw40jBR5' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00269", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:hdxomTws9qW+Z0OLufQ7wwWoDcWil2AmCy/ifuE9UWVW,iv:qgWbqh+PzaNdKf1p,tag:YpNveV8tcvNLj06TAoZ88n]\n db_pass: ENC[AES256_GCM,data:Y0HJ9tw7QPdx0zx2jlUgqEXCDMeTsbsq,iv:5HTPp4x6fcPk+EhP,tag:uARhRDi59Z6nkhBRfdGoNk]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00270", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_6ec7a67c59a774dbd1d040c2\"\n-SENDGRID_KEY = \"SG.iPVHJJcn8O4kuzWdPdaXYr.RDwOIUpBGc41QCe3uprd\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00271", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4yskapQkYlXVReWyhXAAaIRRPS/VMDGTPBlcwfSgdEa' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnhpJ3bPIMgnaxW4LfqPx7AENwyhlBfCUZSRGW2pwg' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00272", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00273", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00274", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAI8xFDm2HV0cUnPT9Q9tY4lBUa8hZAgtOglGhzIA4\nAE1yy+yGEbyJ9aroR6oUSfw+Vj9/MQk7yMrcqy7jgIkGrhmfhSX8P2ERHU1HqK5L\nCMu7iFhIAvAHgNQ/5aenZ23u3gA1kD91Cl3AAtAFJeK5HSLLLz+kdWPae/wYSho+\nm6ZpE3vLWcS1pRMVxXGvA93R6J1j2/nO\n=ju9v\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00275", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAZeMVu4eV+8qFAl70/TzcSzKqq0UJugyXMaXEzQv9\ncLSt4LDO6c/N3SDO5v87AGen9E7CEiEosa6tPPV8gN41oZA6lpu5gIPtrs+3rQQk\nrZWaMCw5fQGQ+ArNKgFmIT5Du1i1/RNG0ye5XbmyNlK/c9pyyL7BlkwoyKfe0YmR\n1YYtrOjaBlVrmZRIopnx8Vy5qcBZZlpJ\n=yNiv\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00276", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00277", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMArv1Kw+2O7Z/M4613pB53Buug3zcDZHaWZviGD7/V\nNzy9BLNqbSD2P33Bd2N6f9nHY87CvEwBuPeUBbgFsKUlsn9NOBHb+7u6PYATYovc\n0VqlJe1IkvCtcid32I3/Bly1GYOWpPKWAJdyuwb1bfWCKMfZPas63j3TDHWdnuj8\nVntsOqGMVToIRjoCAE15CohCrwDBR4y8\n=CucN\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00278", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMA0qFXxrspsGvL2CDq0bWpyAEb3b3AwtCmfuEnXdLY\nPc2VYxwGpsqp+ZPBp963iA+O6Qa9qb/VeV0LWxAfSMKV1/fg4GVC7zeUEBfPPGQr\nDLzPYy4Tbxiz+LbPeTSSalTF62u1RNB6ede4Iytt3nLfDVvqttimMsb53kUYEowf\n6RWAt3Ftn+6eRawxr8Au0w87XxkhJu4Z\n=dKt4\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00279", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00280", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00281", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00282", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:xH43ywNnn2LtWKJTcdmI03miM0tkS4KVpWdL7lGj5s/s,iv:zmf4wmdeomZsCIQg,tag:d/VxJQuDVTpZu4hJ+MgAN5]\n db_pass: ENC[AES256_GCM,data:rjAR76Zb+6V+yNb542UOkqZhIAGiROF7,iv:zPyNX9bmrK7fawoQ,tag:O78wiiOdmjcPD2JNVqmDhN]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00283", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00284", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysv5Zv/4Zb768zZcJl7laY24q9z+9cLqfGUGB9qc5v' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tn1BiGFGGUyB++NpnQdP4iL4/Z3Jar1rW5fKaGnhUq' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00285", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:UJ8KtLWqZU9oCJL49AndKUiUFZqGH0HX1vSj5xQQQ3k5,iv:T5WhnpnBGvIt8B6O,tag:GNzuJErruKvfwm8uwYvO7S]\n db_pass: ENC[AES256_GCM,data:FIDr9eO+y47BuhVhNFqoNwuXXB4NCMpU,iv:6d9wGl1zmcWuEOlr,tag:irIVtQkyJKHqPdfOGcan6J]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00286", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00287", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:3CpYHzVgwqAbpjzNB270zSFdvn72tKgST0wCORZxc+48,iv:+U2PQJ3RD3Jfklq8,tag:xEGszCN111fYKKgGDxeKSt]\n db_pass: ENC[AES256_GCM,data:YMkng6NlWWHPQECByu5ExtNPTOt+BEFv,iv:AK8U1rN5F8SthnLD,tag:/Qh8PD2XNqQ0QSEl8DGzgv]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00288", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAtzvPDNupjxxJ1RL9wVtF7gAcY6XqOXApVP9tabgz\nL+OgUFLUZS+hwuvcTFsTzhbMybDNb2WCcyKPKFBM8uRzThZLXQX7Bzp/YFp4YTMc\ndiInX9owgmardD2kO+ozRoEXKC0eSHbT25adDUZXBx0ybl2l/A5ELqXe43HBLfii\nmZeOk3ZfgFPK+1Z3zWu9Or6SlRuseHZS\n=QWSf\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00289", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00290", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAm9Rjn0PgLC8BtgXrFfyibeQpprdglknymG4zs6cK\n/QEgIXyVxEPSeA9FcI2zdtG0oo0k2PYqBtLfcTRoRy6YK9UWPoi0/TMRhe3JgzIL\nDarhvpMOzi38zalBVWJGxra37oXxoGtRNfAC4uft6ynSwbkfdZf6pfvGOTKaoZ3D\nFF2SmwG65ti6SafzIoOJupyqWD1D3Bdy\n=ou91\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00291", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMARQofWWcoqYVUC6+5q3haI52LS+UnhfwbvsEDXL80\nTtE1gd9Kz4xRwvjKDkRnGr/bnaG9y2VaBUUl3P3eH7YEN344CxcPK5AyFL4Z7eYd\nCpwiMlQcI56skm8pYnLorbzTb28K+TRaNPmC4uitivE1cy8q4JsE8phLWZYqx95H\napCWtivbJ+BH9IbloLih46c5NTuzAnLK\n=iZKX\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00292", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00293", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAmZeZZKZl0EQztBpWIGEbfcHtRjbRUPaUFt8erFi3\ne3rA3uVXwzRCr0oUdIXsI8ma9GF5SnIPBY3v+jiFrQvTNDgcgBM2EiNwKc2jUwpT\n+CarPmEvk6v9OxuhBnMCskbYv7t2/96tZ0LkiMHISlP896Up7BYE4qmtOvt5Hk+y\nEvzTt53P1NKWo7PPiE39OUKaeSEEi4zS\n=+1iq\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00294", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00295", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00296", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_690cb4dfea23f17d6e4f59ce\"\n-SENDGRID_KEY = \"SG.OHiNo+N/rZkKO19PuAASYZ.fw3bkB6VDXzaUjKKTOB1\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00297", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00298", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00299", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ystCF1TuQd6lpzFjTdB8ZrKNtoKLr2VQ3YSlESvm00' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TngobErp5Rd/BglsEqOIm0kpwuedpigbTxwIFZ9r/d' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00300", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00301", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00302", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ys8zeLk02ioZcFHL20U45wVUt97+N3hS2uFh7Bo9Oi' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tnrp1BVi2Q3Q5Tpi3aBecjuJyZQAC4tRSB6GVLgfsW' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00303", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00304", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00305", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_9788190cea63868bb1d569fa\"\n-SENDGRID_KEY = \"SG.Qy/WIkEHa8TkaOJR8sjmnA.bHUTbIdzC4WL/xPwsJA5\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00306", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysyqcBHUCeJW5ftBwMxz/pWG6Pn7bcw1wvYpEEYbmy' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnSELkAxJRagqd99suQ/s/GVcK61KFOpGiyzaZXpoQ' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00307", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00308", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00309", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00310", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysokt7/F+rCK9A/AyGFmgMyjjXOdkpi5sxVC29lfxK' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tncq72k34aezcIhlLFJXFNLymfizuJZ2tjjZqJqIzU' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00311", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_d31531d18b669141ca6607c1\"\n-SENDGRID_KEY = \"SG.G1hgLZiu89RjtFJQnecqrm.eg8/Jga+6Souh3QtCGAK\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00312", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysYZ5Ds0DnbgZw6rE8ju+MYDro27qNL6Ha8pgoV/sl' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnO9e1bkWCoePcF8pRcbIzvAguzysdC8zM4yOLHrqe' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00313", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00314", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_61fe77c7fc379433f081e79c\"\n-SENDGRID_KEY = \"SG.1/rb7rs8ZvLCooQtKASv8o./ER0Ux64WtSLlO+nyhVE\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00315", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAp/nKtB6rFU7mVJwH2+pN3QyDfS/9rmhW6y7BxJg3\n0Di4hibSLN7xqtnLSCgs+Pxa3MpQE1gIz9LjuM2db7yddf90QVfueeLmqqXNGifo\ndVGPm2QyKdR8602Em7eqqhR8DOOA5xuAMie/J4bnfUzsEeO+obmqhOMBm6Ne2Bap\noKeKolvYI4OzDgyMDq2K2kllNWqRr9ZV\n=BTIG\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00316", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00317", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00318", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysYocqMHuFfvSMQSX6SkEENkwgjTrypkA49zbjutIa' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnNwNKFXU+Ym1+2uwKPjUrfeR/9DnHjw9DBgxJUknY' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00319", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00320", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:zpVGj9O/JGo63ZcETHfOoBw6IjaieCbsIqRBTFSWnzeN,iv:UwfTbxfGNSXTi4nd,tag:naCiujPoTmrj0r/vnhBK2J]\n db_pass: ENC[AES256_GCM,data:3hAzh1YN1ERanax6ebgzLaRsYvbvPFtL,iv:ASHLsha0P9AKTgUm,tag:vkvkpkQ+7u1mDCtwrdSTFz]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00321", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:VRMcghvkuGBlCIIzo+rL+b6w55GTLhIe410iM5xS9XQx,iv:4cVwAuFM2gmCLJbt,tag:vAj3u3g/aK5wHD8Zgw7khn]\n db_pass: ENC[AES256_GCM,data:yHXd6mDReQO4LUa/Fyghp1MOK3MDO7S7,iv:62oHFIHw1GU9JNzP,tag:IXX+DSd6KPEFsLNYU0YuRP]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00322", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ys3th9CL1ViO7soX1/gz7UpL6nNvOTKdZTKBGuGoRv' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnQZeEt0/RF9n/PgRD9g6OmQPaGnLjmTua5ALv9vXU' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00323", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_1f2dc523bbc474b3f37169e9\"\n-SENDGRID_KEY = \"SG.TuwC/6jchqm+q7xrEzXgK7.M9jRWaAbVgj36IpTbysJ\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00324", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:paqxZvviATBFFIZtYoiA/KMq0cHS0zyQ0j94KlRjKxvb,iv:gXcP6bU9RldLntcB,tag:EkhlePRW0LO1Vk6YNh2oEk]\n db_pass: ENC[AES256_GCM,data:6cdJ4GPCrDdsJFI4Y57dmkQ1Vbf/AKds,iv:AAGuVrA2ASbB1qjO,tag:6/lDCDqF5qCZSruDXdBjNG]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00325", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMA9jtzdMG/5RePyhbv3eHBvUzGYe1Py/+KxeDH54W/\niRpxRfzbKfNRJHaSESXRF5xcDg8Esso+LUMCj6AQuec17dE0FVblxjQKkWOTNcaR\nN4xNMrDSQ7O3BMVCt1kjQRWqPdfswUCcYRx5/p7+X3YYzKYMyhRy61uFfYtQZHNz\nGrLcd9ZGkVRCqbNJnqWu+Vg5f96HZ39q\n=R5NQ\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00326", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:M0ewKhQdQUmr7I4cjQAjN8QivvIkK376JgN92ZERMICy,iv:sL79EJqEYlqflvdr,tag:ZN5B31NGPD/H8vrG4W9pa6]\n db_pass: ENC[AES256_GCM,data:7i7/+A4avMlDQeSnypMh11HYEpUQA6ex,iv:JzTSp59ZbANH39gc,tag:TC7pd19l4PWFIOkt3wmeZi]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00327", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00328", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_8082e8ce65e5d5636b480a88\"\n-SENDGRID_KEY = \"SG.vekQTyL6u8rLTHtI4/1/Cc.jpQ1kNJ5fU3nkb38H+iC\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00329", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAIi8SXljDybpa/EJ1CfVAQooOw3W9TEvBmP22CPXd\nvvwLn8XoO0kw7C6tkqW+vv6HUSoLC6DcgA+I9xLO3zPozY3ya9rQ5VBVnTNeSsMw\nDSbQBkRqu1RrkrFbJudiTo9KbhUGfWjowJd5J/cR8xnD1mzbOCkXeuyMQxSL5wFK\nNxx5uPSyKOCtx415JN8Si25j785XPGXe\n=PgeO\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00330", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00331", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00332", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ys1xssjZcZiOW4DbUJtd0x2l7YVs/aSL/Bs1YKfZfJ' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TncTQwKLdb7E6fZP5uAf5f9hZVUoZTEmMRBlDIfFsi' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00333", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00334", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00335", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00336", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00337", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00338", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_8f04d82898ab9a453d199813\"\n-SENDGRID_KEY = \"SG.u9USg9oB3zdt74/6f2nJKN.4YEc0bpnkW/rZLB9e5Ez\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00339", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00340", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMADWjTPjeyVhbmFPUf+Q+dXSC2bm2N3nB3bwMzM1zR\npT/pSdFVu0YL3ePJmlt2Zz4Xs4IHm4kDMaKlH461jx8Vw/hNhKAbnt3XpFJnTm41\nm8IcSACHA5rBETgoXizgv4KEcqGagVrZxlhtnyeAygybmyfMzVYvTr+6lz+yW78+\n/FfrbsZrRrvKRYboafMA+jX99yL6RSPU\n=XVZy\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00341", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_8adf5a7f94c91ae013ccdcf3\"\n-SENDGRID_KEY = \"SG.0OJmVEDaAZ7vQvTtl9qNyK.s1+WES+2ivG9h9V/73PC\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00342", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ystLYSuluhAnokrUMTRRcfaJ8iTsPC8Vp23X8tsS2l' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnTO4pTXY45mnkIEwzF/hn6AurDTgfHiU/1399RHMe' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00343", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00344", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAUh/htzqTfgLGdKxtUt6nUXHIPvTp/Q+J1UDdJ4Ov\nl7kWUJb+WzKLNQAbIxUn/1PxetWQigT1m/E1V1bcpHdOWATWW8ocZYTK4GrrjSBU\nI37lAdEs3ZzCBzRfMkg/rEw2Zmvijl+z/on2y8qk78oa6W/DXqWUofGjjDVxiTmW\nK+dZ14z7A7mFo/iIwzXXoiY2oRlWncZT\n=0UTd\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00345", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysjn7cVamoWROIZnrzXfxFJ7rogHTOWRh8Kyb+Os2w' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tnt1jxQIoNksuTOCP/MHxnUi/nZcMNM6RHnnSbkMxL' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00346", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00347", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:ZXRUiaB4VHOXzD/FE31KIpJwN4aHljEkgwWpRsK/oMN6,iv:smKuVABQxedFcj2b,tag:jZDnQoVkVQDU0kUsGrn+Bz]\n db_pass: ENC[AES256_GCM,data:ZLcaJBUUVn2jt7CX4OmEwx8f/YYNbmgA,iv:6XQx8gsW0TA91qFn,tag:9oCJdX5Ti8bvB6fmI5VCL7]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00348", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_f4d5965302520dad669a43c3\"\n-SENDGRID_KEY = \"SG.qzv/lgwcpCaIn3AsB5LdEq.rB6hVfflZcWU0zuwYTTS\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00349", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00350", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00351", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4yshHoniITQa0Gua3kv2mHg4blswD9fxdVPfsKLmzYx' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tn4vKQVL1KIfBQeaat8Mnk19JTY7xF6gBjLniWrw9c' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00352", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4yscd/n3e7FHwjCIygS5+5YVUP6/L18BFfhJdPI5QiQ' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnPoR27mlw3GFUiBjhsQMJSS/024TOKzJ9wwfjdnBH' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00353", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00354", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysX84XqVZ14SSFgcX1rKqKw0aR2v6GAi8qzMoNI1Kc' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnqMrtQQsw7/CBumWIDWM4Zmg89FHOh/RyHLa99yMC' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00355", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00356", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00357", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00358", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00359", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00360", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00361", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00362", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00363", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00364", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_484fe9ac6a15277a015ef3b2\"\n-SENDGRID_KEY = \"SG.jlmj0ycHVHNM4Cg9dXaxUo.mfUGxAv9NsjjUTafj4rq\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00365", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_bc4bc40ee73bc3d7d98b4c11\"\n-SENDGRID_KEY = \"SG.7jfF835HGP9ZKjt+wDXWBn.vGCs8winSG8jV/0jtViu\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00366", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:h5+RWJv/qxJHGEaqzB6TII+tT0CUiOue1n6JMgXTzgPE,iv:s5fYqa0ayrsjYM7w,tag:DrneY2gh2o04Y7kBNbbcnO]\n db_pass: ENC[AES256_GCM,data:otMxTS0TOUHf7GdT74hKjMnB6GFs38nh,iv:koMqc4aCR+U44HZJ,tag:tE2qDoy3+waRC9i2Jj3lRI]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00367", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00368", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_d8d87cc24c9304caf62ce6f0\"\n-SENDGRID_KEY = \"SG.rwolq6nvZr4JhHt3Bg9lby.pJfWbJUoyOHfAvwx/JOx\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00369", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4yskNFW6n2mSvFFDHExnYBnXfqMLo0J9PZlY2mMaZ2h' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tn3ceogt9tlm+Fke/Mf3HzZy000Tb1+QKf+EH7yNKD' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00370", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_620a1cc76325c97245f1da5a\"\n-SENDGRID_KEY = \"SG.Nk4DhRtN1DFOl1A0LGAJIP.JWcWvMmwy9301snSm2r4\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00371", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00372", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00373", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00374", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_2676cd9ccb8a69dafb5dc3de\"\n-SENDGRID_KEY = \"SG.3PTibxCkPJr1Hz4Pq4pZwJ.8XEaonUxzmUhAy+HSrXE\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00375", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAn94fa4nZT1ucVjxoIOBmszrBS/9zBcn2iF0KEhMY\nTWs0dflFcZh3uz+q4EOmmp1Bqnu3xTEL2bZwWPlcWbzHvWdf2SRhkl4zgnhmDxPH\ntRS96pAGa6G+FecZzPhbBccDnIPCUGmaq1wn7vsR34NEGNm3J0pQy/p8BVuN18/4\nJQ5/Lb/+cOxaTvBNdVk1P5MMNyo90kp2\n=zqap\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00376", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAMLZrYdlD7bj+MnJ6asmQISWSyHZdHhSK6d9tsC6w\nWFCnZ8j1vRp1xfkjRW3Briw9GlxPRXYQf5Lp7hBU1vtVDgZaTsJLhTubKPsTc6b7\nA7wwSXn3GedWijCvC1O7rKlsTiGjsLZEEcFT35Ms1KVDqU5BiRvA2hvLvbkCCNYy\nhjXjjExZ808Smg6Odv9vpsw94xBlh/9Q\n=nY7E\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00377", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00378", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00379", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00380", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:WtZLbATsff6RJXfTDozyc8RpeRcK9HGwR+cxWmfg1lks,iv:cTRUT8BFc6Q4IOH8,tag:/eInt8CgWXBp44ZVItSllX]\n db_pass: ENC[AES256_GCM,data:BEj0t2qPmRkF0ACYufSE0tNkyCf7q0nY,iv:NvfuZzPmr8OYLaJK,tag:yXLyQZe5QI1KYpXO4iyFld]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00381", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAnFJr+ReGFt4HuGdqvLR6uXQPQYxZGJa4v2izVPqq\nMnAoDxg9w4Zldj+GCDgxduOf+w8bvxgo4JdfqmllK3EBTn2QSdrnJac+ZNe0cxif\nrD1X6LXxMviblNB9Zn5Gmt3OE5UhceMj4izLsZmDsC9jsfisZlBw2lmfAwGAjDvj\nDidpOEdDua4wV1RBFBaDeelSfy3MZ+xY\n=KoSo\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00382", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:rsLuf3v05Lm3TojlRAHv7vhbUt2PeTIcudosXUoAWaEX,iv:SmSdKIsz/o7cPgD1,tag:VChlT3k51on60VfP2xHDMx]\n db_pass: ENC[AES256_GCM,data:wg8pSKbS+RU5LXMJpPFn4sFHTqtyTZs/,iv:wjVK7xbF8yxKz3E4,tag:uj8lhQkbi7OyV9hB3bh/4Y]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00383", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00384", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00385", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00386", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ys2aJPd3/Fzkb7ZQHDFFdrLiyi9gvPXMzB9CO9xSKh' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnLkc35hnz2UKVDsHQlcFgDrZHOmIJUFFG8sCp3NNR' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00387", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:PtIxMLWljcfmS5BKjZhfALmxRneWEnuziZUEovvBkiRX,iv:9qGhJz2LsxCKkiLf,tag:PGv7YKrU2xWPu9SFE2ftei]\n db_pass: ENC[AES256_GCM,data:ttuwGSevw2j9kNGUmL2CwA4qmgI4Y+ZI,iv:uzWo7PrZdTbjFVEN,tag:w1j6a2ZG4NN8Pnj2OpC9nt]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00388", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00389", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00390", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00391", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:TcmDzP31s7Ryt86s/alhoTYNSjpsF3Wpsryd8Nv7EdQA,iv:YpK2eC/wzveOVVak,tag:sgveG5vq1H9vhnmzUaH+M6]\n db_pass: ENC[AES256_GCM,data:vBWuhPgxEkdvVtlfLhRPkLMGssWnGxT5,iv:LLskuahkTgtcd5PS,tag:B+GHzNISjlZhQDQ886trOh]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00392", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:mjhP5gduigz4X4plqTai446z8EfpXaip1WqpBZ0EbXNU,iv:POQLIO6BzEdI43Fi,tag:cPlsSb1S4xeS0WTF6sD+wl]\n db_pass: ENC[AES256_GCM,data:w4BZ/Lnl/BUWTLulJgJYGmymQk1JBb4V,iv:cl4w6XoHMLefBLlf,tag:mpTUw0+/aEaJ65KQNYzYDG]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00393", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00394", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00395", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00396", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_80591c445b2551ddbb9516a5\"\n-SENDGRID_KEY = \"SG.6T6bAtgo37oWUa2UqFF6jp.i3FGZ39/m9Rn0hHC430P\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00397", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_5dabd52d12bf6c7d14d3f108\"\n-SENDGRID_KEY = \"SG.z+dBXYLq1b0IGbTt8TR6iG.tTbfcH+eOECYmWsME6aQ\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00398", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00399", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysmtFnntgAecb1aasmpx9DtdE+jRRMwW/DQFYeHW5J' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnLFJ2DBV63nEQinIIKNPZcGorhqvG7ZfVDUrI5b9L' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00400", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00401", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysUcOYwFuvmKXIuQUc50MXLCRubAH25a+V9ewDQlRw' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnRwvousWcW6TRDSGH+L4P5i+g7VDiQ7bWtWehlzSx' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00402", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAIa8g48/JAfA8jBXt8FSKAfZ+GDapuXSQoWDi1QXK\nNE5MZdnXq9GgDN4GLjzKsb2h7RdGXsifqwyxGhDM5Ebr5Dm1wyRs+YYvyu4Qnevg\neL6biyFpzLdc3l+tk3YC/pW0JQuBhA9uWKNrjYfr0uCX4IjHUNdg2L2tcZiwxowd\nnQ7vPGbbZu3TGL4OCnqYsilTEFqXryYp\n=tsdB\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00403", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00404", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00405", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00406", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysIiVDZZFLY0J53PyLib2bkxZwmBfBK/20jOqbKziQ' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tn5gEmRXnxPoRSLpOGH88DKj7BYF6KUvZMVwN1U4lU' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00407", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00408", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMATsUQjUHijR5kMn36EgA0TXrcUyQgkyG99w8TZIMc\nXsOLk8HTiX5FYlNuq6oO4mYTHnAVl0wciaCkq5O9Sy4QyY1nFxwp+waKmJoQKxEn\noC1o+N/4rftv5XRD6xO5bjIbMElJOfkWH2+wp/SKXin0Z65HDwDCNmm0JIY34sev\nkYr87dGIFwSFvI8avWtcN6lpAszCG9g6\n=sScY\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00409", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_a4aeabe276ae93946efc6408\"\n-SENDGRID_KEY = \"SG.RRSKV3S1xureWdP7DjB8GN.PCNuDd9rn1BrRM/7qp7I\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00410", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysCsELyeGCzL/55id+X9Q8k89Xhx5//jpbXDGKYhoT' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnlXyaIUa36ZnPc9b5r0+0zPiGB7r4M23Z0bFccF8g' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00411", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysYpC/YUf3Ft8mJfU05p6DlfwEFtau+1BhjWUtrFxo' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnegUGEATRlOiTKLZ50kuYaSh3iSsrG7wDYe1Qh8Py' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00412", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00413", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysuJ1K5z0tCz608WzxEBzq+cwaQ72iBvulFdKIFiJF' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnjxVjaeSxc4k0DRPBRcyEt3BLpZfpmImK5pbf6ZGQ' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00414", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00415", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:qIvFxSwKgemM7wTHu794mGTfpwzBN+p/ZIZw4IQeP7uR,iv:5SMV/X6BqBMOA8Lz,tag:47sB31FLmEUM/f4i/0FeWR]\n db_pass: ENC[AES256_GCM,data:/uURiaIQk6h3xecrwYkt/rSjgvAOpnRc,iv:jmiipI9adFu2W1er,tag:kjstWwFxWVn38G2O4MDirt]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00416", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_1e07a2ab3ec7a3657125f54e\"\n-SENDGRID_KEY = \"SG.s8lyBvRLZK3MlT19w7g41o.pdkNV+PvlsCmT1ei33o6\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00417", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00418", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00419", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAwpSxD68ZfVAR+c7zPRMcT1mqnrq0VKYLqkW7adOk\n4CTpkG2G4CIQgMnIxcccdBOiG3PECvzJhkQ9PprAnlsyP+Q2H8XvVVvDFu/e/xY1\nFKyTK6AYaYOX7TCul1VHOfKl4uUvELxUDiFArs7tdNEIoFlJhNmOj5QMkOcTR8tz\niqDBPLvM6D7QQWzRb8CjtBzMSo70RKtH\n=G4V5\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00420", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00421", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:vlYBKYyK2n6jC0FOt0AITTEdRDmRpO4+Agw7tUyI+3zG,iv:JWVS98Nk+M/4WRYP,tag:6xHBTAfQr2+oP3IIhLmELZ]\n db_pass: ENC[AES256_GCM,data:PYn9MYONZfRk7bygWlajLxn7p0ORRsaJ,iv:fFlhMBl1lwb2pQDO,tag:zKSaagL/V8yv9nW82Hqn36]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00422", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAh6uUtNh+dTJaEIlcqcp/Ua37mOKh1kyRb33nqeoR\nWlCkj34fhBKUk9VkyRgWzGhB7YVAiMlgmzqkCXkcKfR7vPb8aYeHXdvCYaquJAFd\nYGBNdaPobCrsc7ou5f5CDMC7ilb2JpagWemb52IeNcbtzeRO12EefdzI82K6J8Of\n5YqdVMttR8IQhdh/8r6SFSDAe3iKVgcj\n=gBv7\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00423", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMA3DZijnaTwoC3CQumjNwLSIHJYxGlDkM8nUS5Ok5b\n0pGQmMHXssiDLoUzRipeUADk+Ev+optayk2Amrdq4fzm4/l3nk3JlnxcrxZh6Ptr\nsjeDqKsKEsWfJTlOtphxkh+AWPlqylMGCqUuPNHFWKhpaDZq+PZor4lRpvD4kume\nUfq+5pEO0yknd0erABVLhbZMAV6M4j2e\n=6MSc\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00424", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:aeXCwagkaUmAaqd6EJZIY9Goi7dzfVNsx2NWN0WC4k7P,iv:srrqaE1kTIBTwxH7,tag:uM3r+QSnWFWGLbuEE0P2nC]\n db_pass: ENC[AES256_GCM,data:btOcLMUIuX0odp+BbiwJAOyT2AwR6z6u,iv:fkdGikitP6H4irLd,tag:wYOuxvZPEDULcC567Xu5F3]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00425", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:UVvk88V1AY2dQZX22LOlrR2B4nNFRL7Nj0QvcaJWvT8s,iv:AVEu1Ie/RMETvNAt,tag:UVbdwbYn4eHFFCHP5/5mnG]\n db_pass: ENC[AES256_GCM,data:sTNEZZdp/VRd0sfPpP3dlbMmo6IUReL7,iv:F+7FDDpAWDtwv4n5,tag:GNZSmXUgdynun0IUiSm8fx]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00426", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00427", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ys+HvYDjqBZBysgOh0tGBg7+9Jp/QD45DdLdK06wQk' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnVXxNDXkIIHXMfQ0L91wfRvLVSr1z//BXj0aq9k3+' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00428", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00429", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAIvFaeLWMwc5tCc7RoFW85V6SdSQD5cOpSBRggQaF\nNZVyrE1FslG633WWF5vfwd6z7ewDSxAA3A/5+KAVyAaKxhA3env+lqxejzzLfjT5\nCVt1SyFtEWGMAmK7dkOqnK1lW0UBiahEz6Xhy+Wf03p/P1xwZaYlamAnVFxNsXHZ\nata+c2knniXlC3/nYiUY1fJSj91IRB0T\n=LG/9\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00430", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00431", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:mPQegPkWDYb8OBzzUNEGPk8uGvm+FdlQr/1FnOmVQjqv,iv:2CSA1Lv01UdzDdYi,tag:2zj2NYMGkU9pGkaTurDFrf]\n db_pass: ENC[AES256_GCM,data:zf2C1i5ki8WgKur7Qb2it2LsQVq2D1/3,iv:e46IBObV4c52SMUV,tag:GjnS+Yx7LmZ7LsjDAgXQAT]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00432", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAI/Cai557TJJ8kWKB2BokbPoXG/yAaOLSwQuZ12LF\ncq0mpzUa8/rBJIVpQWHGIdkng9ZB4irFGdcudafshuYXab6Q97CH8qCWotFpzK0O\ncMggH8yeog9wiQOPTwef5PmwtVKkKelKNVLUoXpICAD2cO11H8515X1bnN+JIsQP\nbgmpSKnNRCayyG4Ewtfuo0g0GdCC1FL/\n=Y0JM\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00433", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00434", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_02ff5708c2a066779a49a25c\"\n-SENDGRID_KEY = \"SG.DmzKA8SgVuCWwU+tZ0I+uU.P8KdhH8WghVEpo3eDsA/\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00435", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:dA3/aMmV/3oBSlFGBpOV5yS2XKpN4iXCvu4vEH8imI0m,iv:krR3jfhHQXTS6y79,tag:qAZ8/ObRw/EWWSAg/mhNlK]\n db_pass: ENC[AES256_GCM,data:rXTl9oGS3W2lpL3gGrxeIkIH7pqa4wom,iv:6GBmQ3a+LW8xg1GT,tag:PfjVxHlI6usOtyRH3InK2I]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00436", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00437", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysz7QzembJygkz5Ga8SzMGZYQsffZp2T2RogTSypyl' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnWjr1tsaOD62ykKe1OGHfy+AcQd35sLOCNvGOg0y0' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00438", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysr9AOIs/3o06BdlRjnHmrq1DZPaDkHbpQ/OV1BgIo' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnomhWqKuqZk63SsWlaYGQJwPdL/whCza+kMk92WEo' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00439", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00440", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysVMoMpp9WxVkqzj+JGsd68+1EzqMLjUWVbobAqgJP' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tn1Lcub+WrQ2QvbuJ6DkddqqKogeh82amqzRGr8zRF' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00441", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_7c96f73604e710106982d28f\"\n-SENDGRID_KEY = \"SG.OanpxziMTECi6AsJdQgmEe.uqPevF4k18oNa9WwMiS2\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00442", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00443", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:mMJDpTbfNM1t+rFRP2cW8c+Det0y3K8oyXcmRbE6z5Ug,iv:d3bZTF4BO4c26Z5G,tag:YDDeU8KguDopWhq2CJTC68]\n db_pass: ENC[AES256_GCM,data:yZSJe+1Lh2WN2G6kKRe4bHgSRJvxDoTr,iv:DAhuK+b0BNqJ7gVa,tag:dUcCAjX/dB+cXMkAVlJQvY]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00444", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00445", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMA7VqLF0M5xZPMSZA0urUx5DJ+QU9EedSmLSwTdBZD\nJmzXgsobd7w9dsmgR2DjXahjC/VDCn9a3WlSkU6SnJg6Az7k4cVt8z+oeG/rEvds\nZ/G+cnNz6uYwQl6pbN/o3jXd0BCzuPuVlk+h3+rvS8GBeJaJe+H9CloXCJ7Pyw1i\nhhC/wxFx9NxJI4rfXvRL2SLP7uzjzuby\n=lQef\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00446", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMASx3m4qve+DmWq3Hbe/BkmrWzRejS6XpZiRq4CVG+\narSkUeJrXJ4QpX8JW3UUhizhWMaa2uIL3vP/chbnTb/JVS5v+TvPUQZLclgpeAAt\nbiOk9sBCBqGjRUK3zkDZN0Yq5UM2y3jpf1Vx9wT3WzF3Ggb+N2t7KWsgrcy4TKuY\niioEjrU+6yglgn3x1XFuzGauGKt9HxO7\n=1REH\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00447", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00448", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00449", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00450", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00451", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00452", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:ymx6AjDSiApZEoqINMWwv/10Xc5Y025b3FRbis3bVQKr,iv:oxng4PSNbn8VhH1V,tag:92O4BFVEPid7f3sJGpDJzY]\n db_pass: ENC[AES256_GCM,data:PCTYWPm77juL8iqxWEXDqCvkgZHwf7st,iv:/oyHLzXF13lYWYsv,tag:SSLJxGMCE4K81RlviOj+uA]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00453", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00454", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMALsVCCQe/KYnA633uTXuYi+hJVl8vOfrnFBzm6L4w\nXKNFDfEOj3icThYgqGAAdlfFLg3XWKzgSQZQaTOwS5rQERP4ULzwQN0mc/hhDVeP\n3qWpoBxCECqU0y1v2unetPCfa6e5O3bYfQKc1/zTAW1rj26fh7soyGZYVnwm72KT\n4uCVynUEJfdFHoMZ1rUV9eRfNOMQQpXz\n=36vS\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00455", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4yso3cuO1z/nbPmj7YdRydG39Z2dt6gnPW5m7UV/OMx' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tnk74WMLICEdxHLXE/S6yW7uTl0EdipX0niGm0AkpW' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00456", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4yseFfiMerSPeLYWEQ6vMjSxiIJQ35mYjjXTMop8ICN' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TngUmZMAFkHtVrrxcR5pW7hJwRHdIuV08WVvhaHgJP' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00457", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00458", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAMZqFfnIXJBmyOyv7o0CVAo8K3j3S6kh7wlFn4Fsu\nukMa6aEWbE6KkewLC+AbIVuhJCt+oBnCHwCtVRwPxhhOI9qYMy6pKlEEEpOforDx\n5e2N7W1ExLQ2oU0cX6uasVCyJsuKKr7siQ3giNp4d+ApxY4x8u6LIK/klTM6HJWu\nEPJXY+D8pLEoPGpBybFKFZ7+YWRs/QCi\n=z85U\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00459", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00460", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00461", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00462", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMANTSjwCkspvtfwFeCnJXUYkZuf4Y2DcGGavumJamz\nNEBnNxXV+wZ2AAlXIuJJY0l3HvC4Jjs9Ktogp3Bmc9xnAq6n3XW7BkIBQczE/wwY\nVWuga8WQC5i+slSZINGeO6ZHjvGWYOcbshYfdD8WLhyHhX0fOO+fPbrQwc3tJcPL\niEz5NcPtYNvPV2PGcRYzJzF3tuGVFHow\n=YX3Q\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00463", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysrOYOTzpMXUqn6TbS3U3IVFkutRyVdL8nFaL94+96' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tng5oOsMRJxgqqA/xojwAizGzXkW4wFVLtrcdKGYh5' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00464", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_157e046f1dc7e5d4124fa8a9\"\n-SENDGRID_KEY = \"SG.YVs/qQ1ZhoUDcMFBbmJmpz.uk50QaZsRtqWrYBhwsuv\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00465", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00466", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_2fbd341b5d95edacd55e80ea\"\n-SENDGRID_KEY = \"SG.HlakezncQQnHgYjECp4iCU.CBN6Y3L2WICTWLjKrNYm\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00467", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAw4k3U4Aq09aRoP5Pnlmz5TngCapcnRomPYQ4gbzr\n0kBI33oHS6Pxmhr45KIgFqfuZbyBG2pydz8A/lj3FOi79gY/j9BP8Xv9idse324F\nPzT4eKNPl9HAx+nJWJZ7hc9EmH+frmbNM9bd2VzzcalPss05CHIHkoDI48jYniDR\n9ucsQRJ85F4sPGztMDdEO1l+WnAMHEw+\n=PPr6\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00468", "source": "hard_negatives", "source_license": "generated", "text": "diff --git a/config/settings.py b/config/settings.py\n--- a/config/settings.py\n+++ b/config/settings.py\n@@ -12,4 +12,4 @@\n-STRIPE_KEY = \"sk_live_850bbf90372a13598431ca94\"\n-SENDGRID_KEY = \"SG.hfzfNm6nl2B/ZyRn/Viy1o.hgdJjgefCMLu6qvhQKbe\"\n+STRIPE_KEY = os.environ[\"STRIPE_KEY\"]\n+SENDGRID_KEY = os.environ[\"SENDGRID_KEY\"]\n # Removed hardcoded credentials \u2014 now from env vars", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00469", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00470", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00471", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:ACZOkAoMfZplhPbTZ+Yy/dAVbskm4CsQLxfvjT3NN1SR,iv:wzhH8HT2HZh0JpEg,tag:3hekqkSG/49CeRneV54qK7]\n db_pass: ENC[AES256_GCM,data:Rzu5udwVaq5PY7z6Dyn4hRCI2QH1fk89,iv:Ey9BaeeXPVu2XUT3,tag:J92eArrStQ/eh4E4Q8j6Hi]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00472", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00473", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00474", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysief6qdH8MwOvjrSzj2FBuWo8WrYacu0gSn+7goRP' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnVYOWaFMROIKRuVdJXoagRO9OF1pro/12EBMcQGx1' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00475", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:1eZSZuqaKEfVHNJSrbNkbUQwMEKGHCjzd8VMOle8gM3c,iv:SU51YlFP5b+/VdGm,tag:WjQh7viJX4n9lyFw0Tn285]\n db_pass: ENC[AES256_GCM,data:hlDh9frlPFjuFS3lYRtjMlCpEhPDNNjd,iv:3vKQ2v85ZaXxSVJF,tag:ZTosYFDwjHOBR5ijpgQOpn]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00476", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00477", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00478", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAvxWc3zK910T4kiUl26JYHuTZdXWKn1gE++JCHEko\n/B8JiPHNZnego71tTIYZImO/CVohondqrk1ub24auowPGinqUQXbJlPo/d7UIFLJ\nkvFwD/Bsu28ncXyA5d4Sn5fK/TS//LvoMFU1qdFN+a8FOnAZL45s6Hcjglr+ttJ7\npxYuX81KMv5y6COi0/6VcwJQM2u+u6IK\n=WY2I\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00479", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysrB8C/SIfUq/cud9xf5xSuE/aYdUPZMMp7boqOtcV' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8TnIyEK1YrBtq+a4csA2qDHnUICkAs5LjsBuBfmcEvf' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00480", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00481", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00482", "source": "hard_negatives", "source_license": "generated", "text": "import secrets, string, hashlib\n\ndef generate_password(length=16):\n alphabet = string.ascii_letters + string.digits + \"!@#$%\"\n return ''.join(secrets.choice(alphabet) for _ in range(length))\n\ndef hash_password(pw):\n salt = secrets.token_hex(16)\n h = hashlib.pbkdf2_hmac('sha256', pw.encode(), salt.encode(), 100000)\n return f\"$pbkdf2${salt}${h.hex()}\"\n\nif __name__ == \"__main__\":\n for i in range(5):\n print(f\"Hash: {hash_password(generate_password())[:40]}...\")", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00483", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00484", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:lQdRxvbpvb37eFeBr8EXUymX0OS5XkpLzdx9gG6rLsWP,iv:MWqt8Il5efZpCi8R,tag:rFT0kLVuKTr1+6Kt4KtvWI]\n db_pass: ENC[AES256_GCM,data:5p+LPsVZFb9WEQREZ2EnHurjhgIhiICC,iv:ZBSzdNLM5k1iKPnC,tag:3F7aYA2uhO2BYYUP0ActrC]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00485", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMA6/rwC28d+/VSx9qsOYS4uZiyOF8rVrvvQE88Rn0S\n+a5v/58XRk7EHTXEKR4F8J/13VPBzp7ZIYlDRtIPX9ZsSc9MzgwE3DHiFAs/Ly8B\nv2RZvlcyeBEdNjdQben2tVbnXtl/KTWrsJfyKwNhPl2Aqp/IJ/5q6LgfjZ0K5+/M\nyBBLjK70JnE4R4skGyEEtJXdp0U3EiY/\n=K0zw\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00486", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:wkCMr1ORSpDzJDTLpGQKrMZ29CGEFI6fsCT2kyNYu1sV,iv:FeGjsqTaZKiXrYpd,tag:7BC7szZufnnef4UGxCo40E]\n db_pass: ENC[AES256_GCM,data:SUT/Srm5CAbFolg7/2CDpMZQf4aQ8KAe,iv:ZJ26kU5aaeHv2L7d,tag:6uf8pIcrEeJ2/ctd5V7TKu]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00487", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00488", "source": "hard_negatives", "source_license": "generated", "text": "# test_data.py \u2014 ALL DATA IS FAKE\nTEST_USERS = [\n {\"name\": \"Jane Doe\", \"ssn\": \"000-00-0000\", \"email\": \"test@example.com\"},\n {\"name\": \"John Smith\", \"ssn\": \"111-11-1111\", \"email\": \"test2@example.com\"},\n]\nTEST_CARDS = [\"4111111111111111\", \"5500000000000004\"] # Standard test numbers\n\ndef test_validation():\n for u in TEST_USERS:\n assert validate_ssn(u[\"ssn\"])", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00489", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00490", "source": "hard_negatives", "source_license": "generated", "text": "-----BEGIN PGP MESSAGE-----\n\nhQEMAzXZSr7W/MA2qG5yuw1kt3Wy4QSAhUF24VkXghJ0g\nd9beFYv6ckFJ2ucrs55ri+qjzYbIS2e0oQQ+4AqN/cjeUQhj6a+QfPcI5oxEQoVY\nzVRuhDfcYBf1DWhV4aCEqG+xBHBEZBFSMk0JoLhn8LjxClxFoB16rS5RgRcLZZSO\nXL2/IfQkWZdngaJcw0cezPTVzpd57N4N\n=uz5W\n-----END PGP MESSAGE-----\n\n# PGP-encrypted \u2014 content not readable without private key.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00491", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00492", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00493", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00494", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00495", "source": "hard_negatives", "source_license": "generated", "text": "# SOPS encrypted config \u2014 safe to store in VCS\napiVersion: v1\nkind: Secret\ndata:\n api_key: ENC[AES256_GCM,data:Iz3m2dXp3GmjdjurcJ8bNbCZDn9PJ60Im45W+OBuss99,iv:2WYobaBoZ1TaIS8F,tag:cr3RENas4+O8V0dEiPKkDq]\n db_pass: ENC[AES256_GCM,data:hmRXuOd25I86vE5GasFbkkuakulxiIe1,iv:5hvqfZJEWXaxn3Vh,tag:HrGwfsi97aq7+VxvL6nZjA]\nsops:\n kms:\n - arn: arn:aws:kms:us-east-1:123456789:key/abcd", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00496", "source": "hard_negatives", "source_license": "generated", "text": "# conftest.py \u2014 shared test fixtures (all mocks)\nimport pytest\n\n@pytest.fixture\ndef mock_db():\n return \"postgresql://testuser:testpass@localhost:5432/testdb\"\n\n@pytest.fixture\ndef mock_keys():\n return {\n \"stripe\": \"sk_test_xxxxxxxxxxxx\",\n \"github\": \"ghp_xxxxxxxxxxxx\",\n \"openai\": \"sk-proj-xxxxxxxxxx\",\n }\n\n@pytest.fixture(autouse=True)\ndef no_external_calls(monkeypatch):\n monkeypatch.setattr(\"requests.get\", lambda *a,**k: None)", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00497", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00498", "source": "hard_negatives", "source_license": "generated", "text": "-- Migration: password hashing\n-- These are bcrypt hashes, NOT plaintext\nUPDATE users SET password_hash = '$2b$12$LJ3m4ysCG1mKjx2MydAAcft0hENtfPI0K5ysmt9wSftVu++' WHERE id = 1;\nUPDATE users SET password_hash = '$2b$12$aK5r8Tnr8JhcIugsSY7gCJEAo+Wiaj0poHOpQyXuNTjbaXp' WHERE id = 2;\n-- Bcrypt with 12 rounds \u2014 originals not recoverable.", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]} {"id": "hard_safe_test_code_00499", "source": "hard_negatives", "source_license": "generated", "text": "import os\nfrom app.auth import AuthClient\n\ndef test_key_from_env():\n key = os.environ.get(\"API_KEY\")\n assert key is not None\n client = AuthClient(api_key=key)\n assert client.is_valid()\n\ndef test_missing_key():\n with pytest.raises(AuthError):\n AuthClient() # No key = error", "findings": [{"category": "safe", "subcategory": "safe.code", "severity": "info", "explanation": "Test fixtures with fake data, password generators, encrypted configs, hashed passwords, or diffs removing secrets. No real credentials exposed."}]}