-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.py
More file actions
38 lines (33 loc) · 1019 Bytes
/
config.py
File metadata and controls
38 lines (33 loc) · 1019 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env python3
"""
Sample Python file with embedded secrets and PII.
"""
import os
import json
# Database configuration
DATABASE_CONFIG = {
"host": "localhost",
"port": 5432,
"database": "users",
"username": "admin",
"password": "supersecret123", # This should be detected
"connection_string": "postgresql://admin:secret123@localhost:5432/users" # This too
}
# API configuration
API_KEYS = {
"aws_access_key": "AKIAIOSFODNN7EXAMPLE",
"aws_secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"jwt_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"
}
# User data (PII)
user_data = {
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1-555-123-4567",
"address": "123 Main St, Anytown, USA"
}
def process_user(user_info):
"""Process user information."""
print(f"Processing user: {user_info['name']}")
print(f"Contact: {user_info['email']}")
return True