|
Download code/code220.jsonl from winapiadmin/tinycodinglm: direct link, hf CLI and curl.
- Browser
- Download file 2.2 kB
-
https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/1c6bb525d6b4b9cdb15d2a75d54734eb29bbb8cb/code/code220.jsonl
- Command line
-
hf download hf://datasets/winapiadmin/tinycodinglm@1c6bb525d6b4b9cdb15d2a75d54734eb29bbb8cb/code/code220.jsonl
-
curl -L -o code220.jsonl https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/1c6bb525d6b4b9cdb15d2a75d54734eb29bbb8cb/code/code220.jsonl
2.2 kB
| {"type": "session", "harness": "deepseek-harness", "id": "code220", "name": "Security best practices for developers"} | |
| {"type": "message", "message": {"role": "system", "content": "You are an expert software engineer and technical assistant. You provide accurate, detailed, and practical answers. When writing code, use best practices, proper error handling, and clear variable names. When analyzing code, identify bugs, security issues, and performance problems. You have deep knowledge of C/C++, Windows API, Python, and many other technologies."}} | |
| {"type": "message", "message": {"role": "user", "content": "What security practices should every developer follow?"}} | |
| {"type": "message", "message": {"role": "assistant", "content": "**Input Validation:**\n- Validate all inputs (never trust user data)\n- Allow-lists over deny-lists\n- Sanitize for context (HTML, SQL, shell)\n- Use parameterized queries\n\n**Authentication:**\n- Use established libraries (bcrypt, Argon2)\n- Multi-factor authentication (MFA)\n- Secure password reset flow\n- Rate limit auth endpoints\n- JWT with short expiry + refresh tokens\n\n**Authorization:**\n- Principle of least privilege\n- Role-based (RBAC) or attribute-based (ABAC)\n- Check permissions at every endpoint\n- Avoid IDOR (insecure direct object references)\n\n**Data Protection:**\n- Encrypt at rest (AES-256)\n- Encrypt in transit (TLS 1.3)\n- Hash passwords (never encrypt)\n- Tokenize sensitive data (PII, credit cards)\n- Key management (HSM, KMS)\n\n**Common Vulnerabilities (OWASP Top 10):**\n1. Broken Access Control\n2. Cryptographic Failures\n3. Injection (SQL, NoSQL, Command)\n4. Insecure Design\n5. Security Misconfiguration\n6. Vulnerable Components\n7. Authentication Failures\n8. Software Integrity Failures\n9. Logging/Monitoring Failures\n10. Server-Side Request Forgery (SSRF)\n\n**Secure Development:**\n- Threat modeling\n- Code review for security\n- SAST/DAST in CI\n- Dependency scanning (Dependabot, Snyk)\n- Security headers (CSP, HSTS)\n- Content Security Policy\n\n**Tips:**\n- Security is everyone's responsibility\n- Shift left (early in SDLC)\n- Automate security checks\n- Regular training\n- Incident response plan"}} | |