A shared folder with AI prompts and code snippets
From workspace: Replit
Team: AI Prompts
Total snippets: 5
5 snippets
Check a Bash script for dangerous patterns or unsafe commands.
Review this Bash script. Find insecure command usage or practices. Script: #!/bin/bash FOLDER=$1 rm -rf $FOLDER
Review use of JWTs for access control and storage strategy.
Review the security of this JWT usage. What’s good, what’s missing, what’s risky? Code: const token = jwt.sign({ id: user.id }, 'secret', { expiresIn: '1h' }); res.cookie('token', token);
Review how passwords are stored and suggest secure practices.
Is this password storage safe? Suggest a secure alternative. Code: const users = []; function register(username, password) { users.push({ username, password }); }
Check frontend code for potential XSS vectors and output sanitization.
Find potential XSS vulnerabilities in this code. Suggest fixes or best practices. Code: <input type="text" id="nameInput" /> <div id="greeting"></div> <script> const name = document.getElementById('nameInput').value; ...
Detect and fix potential SQL injection in backend code.
Review this Python code for SQL injection risks. Suggest secure fixes using parameterized queries. Code: def get_user(email): query = f"SELECT * FROM users WHERE email = '{email}'" return db.execute(query)