PromptsVault AI is thinking...
Searching the best prompts from our community
Searching the best prompts from our community
Prompts matching the #security tag
Design KYC/AML compliance verification flow. Steps: 1. User document upload (Passport/ID). 2. Optical Character Recognition (OCR) data extraction. 3. Face liveness detection (biometrics). 4. Sanctions screening (OFAC, PEPS). 5. Address verification service (AVS). 6. Risk scoring model implementation. 7. Manual review queue for flagged cases. 8. Audit trail and record retention. Include webhook notifications for status updates.
Develop comprehensive penetration testing plan. Stages: 1. Scope definition and rules of engagement. 2. Reconnaissance and information gathering (OSINT). 3. Vulnerability scanning (automated tools). 4. Exploitation phase (SQLi, XSS, privilege escalation). 5. Post-exploitation and lateral movement. 6. Data exfiltration simulation. 7. Reporting with risk severity (CVSS) and remediation steps. 8. Debriefing and re-testing. Include social engineering scenarios and physical security assessment.
Architect HIPAA-compliant patient data storage system. Requirements: 1. Data encryption at rest (AES-256). 2. Data encryption in transit (TLS 1.3). 3. Role-Based Access Control (RBAC). 4. Audit logging of all access events. 5. Business Associate Agreement (BAA) with could provider. 6. Automated backup and disaster recovery. 7. De-identification mechanisms for research. 8. Intrusion Detection System (IDS). Include breach notification protocol.
Secure your applications against common vulnerabilities. OWASP Top 10: 1. Injection (SQL, NoSQL, OS commands - use parameterized queries). 2. Broken Authentication (implement MFA, secure password storage with bcrypt). 3. Sensitive Data Exposure (encrypt data at rest and in transit, HTTPS). 4. XML External Entities (disable XXE in parsers). 5. Broken Access Control (enforce authorization checks). 6. Security Misconfiguration (disable debug mode, update dependencies). 7. XSS (sanitize user input, use CSP headers). 8. Insecure Deserialization (validate serialized data). 9. Using Components with Known Vulnerabilities (dependency scanning). 10. Insufficient Logging (log security events). Use security headers, rate limiting.
Conduct Solidity smart contract security audit. Checklist: 1. Reentrancy vulnerability check. 2. Integer overflow/underflow analysis. 3. Access control verification (modifiers). 4. Gas optimization review. 5. External call safety. 6. Front-running mitigation. 7. Logic error detection. 8. Test coverage analysis (Hardhat/Foundry). Include formal verification results.
Optimize Docker images using multi-stage builds. Techniques: 1. Separate build and runtime stages. 2. Use slim base images (alpine, distroless). 3. Leverage layer caching with proper ordering. 4. Copy only necessary artifacts to final stage. 5. Use .dockerignore to exclude files. 6. Run as non-root user for security. 7. Scan for vulnerabilities with Trivy. Example for Node.js app: reduce image from 1GB to 150MB. Include CI integration and registry best practices.
Implement HashiCorp Vault for secrets management. Configuration: 1. Initialize and unseal Vault cluster. 2. Enable authentication methods (AppRole, Kubernetes). 3. Create policies for least-privilege access. 4. Store secrets (database credentials, API keys). 5. Dynamic secrets for databases (auto-rotation). 6. Encryption as a service for sensitive data. 7. Audit logging for compliance. Integrate with CI/CD pipelines and applications. Use auto-unseal with cloud KMS. Include backup and disaster recovery procedures.
Validate and sanitize user input. Techniques: 1. Whitelist allowed input. 2. Validate data types and formats. 3. Length restrictions. 4. Regex for pattern matching. 5. Sanitize HTML to prevent XSS. 6. Parameterized queries for SQL injection. 7. Validate on client AND server. 8. Contextual output encoding. Use libraries like Joi, Yup, or validator.js. Never trust user input. Fail securely.
Scan for security vulnerabilities. Tools: 1. SAST (Snyk, SonarQube) for code analysis. 2. DAST for runtime scanning. 3. Dependency scanning (npm audit, Dependabot). 4. Secret detection (GitGuardian). 5. Container scanning. 6. Infrastructure as Code scanning. Integrate in CI/CD. Fix critical issues immediately. Use OWASP Top 10 as guide. Regular security reviews.
Protect APIs with rate limiting. Strategies: 1. Fixed window (requests per minute). 2. Sliding window for smoother limits. 3. Token bucket for burst handling. 4. Leaky bucket for consistent rate. 5. Per-user vs global limits. 6. Redis for distributed rate limiting. 7. Return 429 with Retry-After header. 8. Different tiers for API keys. Use middleware like express-rate-limit. Implement exponential backoff guidance.
Implement JWT auth securely. Flow: 1. User login with credentials. 2. Server validates and creates JWT. 3. Client stores JWT (httpOnly cookie or memory). 4. Include JWT in Authorization header. 5. Server verifies signature and claims. 6. Refresh tokens for long sessions. 7. Token expiration and renewal. 8. Logout (blacklist or short expiry). Use RS256 for production. Don't store in localStorage. Implement CSRF protection.
Create a regular expression to validate a strong password. The password must be at least 8 characters long, contain at least one uppercase letter, one lowercase letter, one number, and one special character (e.g., !, @, #, $). Explain the different parts of the regex.
I accidentally committed sensitive data to my last commit and pushed it to the remote repository. What are the Git commands I need to use to completely remove the sensitive file from the repository's history? Explain each step of the process.
Analyze the following PHP code snippet for common security vulnerabilities like SQL Injection, Cross-Site Scripting (XSS), or Insecure Direct Object References. Explain where the vulnerabilities are and how to fix them.
What is the best practice for managing environment variables (e.g., API keys, database passwords) in a Node.js project? Explain the use of `.env` files and the `dotenv` package. Provide an example of how to load and access variables from a `.env` file.
Explain the structure of a JSON Web Token (JWT). What are the three parts (Header, Payload, Signature)? What information is typically stored in the payload? How is the signature used to verify the token's authenticity? Provide an example of a decoded JWT payload.
Write a transparent security breach notification. Must include: 1. Clear statement that breach occurred. 2. What data was compromised. 3. What data was NOT affected. 4. Timeline of discovery and response. 5. Immediate actions taken to secure systems. 6. Required customer actions (password reset, monitor accounts). 7. Resources provided (credit monitoring, support line). 8. Commitment to preventing future incidents. Be honest, clear, and action-oriented.
Request payment method update. Communication: 1. Explain why update is needed (expiration, decline). 2. Provide secure update link. 3. Assure data security measures. 4. Set deadline to avoid service interruption. 5. List accepted payment methods. 6. Offer assistance if they have trouble. 7. Confirm successful update. 8. Thank them for prompt action. Make process secure and simple.
Build an anomaly detection system for transaction fraud. Approach: 1. Use Isolation Forest for unsupervised outlier detection. 2. Engineer features (transaction amount, time of day, location distance). 3. Set contamination parameter based on historical fraud rate. 4. Generate anomaly scores and flag top 1% as suspicious. 5. Create alerting system with precision/recall monitoring. Visualize anomalies on a scatter plot with decision boundary. Balance false positives vs fraud detection.