The following credentials have been exposed in the repository and MUST be regenerated immediately:
- Access Key ID:
<AWS_ACCESS_KEY_ID> - Secret Access Key:
<AWS_SECRET_ACCESS_KEY>
Actions Required:
- Go to AWS IAM Console: https://console.aws.amazon.com/iam/
- Navigate to Users → Your User → Security Credentials
- Delete the exposed access key
- Create a new access key pair
- Update the
.envfile with new credentials - NEVER commit the
.envfile to the repository
- Token:
<GITHUB_TOKEN>
Actions Required:
- Go to GitHub Settings: https://github.com/settings/tokens
- Find and revoke the exposed token
- Generate a new Personal Access Token with required permissions:
repo(full control of private repositories)workflow(update GitHub Action workflows)
- Update the
.envfile with the new token
- ❌ Commit
.envfiles to version control - ❌ Hardcode credentials in source code
- ❌ Share credentials via insecure channels
- ❌ Use the same credentials across environments
- ✅ Add
.envto.gitignore(already done) - ✅ Use AWS Secrets Manager or Parameter Store for production
- ✅ Use environment variables in CI/CD pipelines
- ✅ Rotate credentials regularly (every 90 days)
- ✅ Use IAM roles with least-privilege permissions
- ✅ Enable MFA on AWS accounts
After regenerating credentials, your .env should look like:
# AWS Configuration
AWS_REGION=ap-south-1
AWS_ACCESS_KEY_ID=<NEW_ACCESS_KEY>
AWS_SECRET_ACCESS_KEY=<NEW_SECRET_KEY>
# Amazon Bedrock
BEDROCK_MODEL_ID=meta.llama3-8b-instruct-v1:0
BEDROCK_MAX_TOKENS=4096
# Amazon S3
S3_BUCKET_NAME=regradar-documents
S3_BUCKET_REGION=ap-south-1
# Amazon OpenSearch
OPENSEARCH_ENDPOINT=https://search-regradar-search-luufdwy33xqoj7ogl52wxv2l6m.ap-south-1.es.amazonaws.com
OPENSEARCH_INDEX_REGULATIONS=regulations
OPENSEARCH_INDEX_VIOLATIONS=violations
OPENSEARCH_INDEX_INFRASTRUCTURE=infrastructure
# GitHub Integration
GITHUB_TOKEN=<NEW_GITHUB_TOKEN>
GITHUB_OWNER=shashankmp2004
GITHUB_REPO=regRadar-infra-test
GITHUB_DEFAULT_BRANCH=main
# API Configuration
API_HOST=0.0.0.0
API_PORT=8000
API_DEBUG=false
API_SECRET_KEY=<GENERATE_SECURE_KEY>
# Feature Flags
ENABLE_AUTO_REMEDIATION=false
ENABLE_GITHUB_PR_CREATION=true
REQUIRE_HUMAN_APPROVAL=true
# Logging
LOG_LEVEL=INFO
LOG_FORMAT=jsonimport secrets
print(secrets.token_urlsafe(32))Minimum required permissions:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::regradar-documents",
"arn:aws:s3:::regradar-documents/*"
]
},
{
"Effect": "Allow",
"Action": [
"bedrock:InvokeModel",
"bedrock:ListFoundationModels"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"es:ESHttpGet",
"es:ESHttpPut",
"es:ESHttpPost",
"es:ESHttpDelete"
],
"Resource": "arn:aws:es:ap-south-1:*:domain/regradar-search/*"
}
]
}If you believe these credentials have been misused, contact the security team immediately.
Document Generated: 2024 Status: ACTION REQUIRED