RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/ThanhTrunggDEV/DontBeLazy

Cursor rule

.cursor/rules/web-security.mdc
Cursor rules

Quality

61/100

Scores the file, not the repository.

Length

183 words

7 headings · 2 code blocks

Repository

6

— · pushed 80 days ago

Last changed

3 days ago

First indexed 3 days ago.
ThanhTrunggDEV/DontBeLazy/.cursor/rules/web-security.mdcRawGitHub
1> This file extends [common/security.md](../common/security.md) with web-specific security content.
2 
3# Web Security Rules
4 
5## Content Security Policy
6 
7Always configure a production CSP.
8 
9### Nonce-Based CSP
10 
11Use a per-request nonce for scripts instead of `'unsafe-inline'`.
12 
13```text
14Content-Security-Policy:
15 default-src 'self';
16 script-src 'self' 'nonce-{RANDOM}' https://cdn.jsdelivr.net;
17 style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;
18 img-src 'self' data: https:;
19 font-src 'self' https://fonts.gstatic.com;
20 connect-src 'self' https://*.example.com;
21 frame-src 'none';
22 object-src 'none';
23 base-uri 'self';
24```
25 
26Adjust origins to the project. Do not cargo-cult this block unchanged.
27 
28## XSS Prevention
29 
30- Never inject unsanitized HTML
31- Avoid `innerHTML` / `dangerouslySetInnerHTML` unless sanitized first
32- Escape dynamic template values
33- Sanitize user HTML with a vetted local sanitizer when absolutely necessary
34 
35## Third-Party Scripts
36 
37- Load asynchronously
38- Use SRI when serving from a CDN
39- Audit quarterly
40- Prefer self-hosting for critical dependencies when practical
41 
42## HTTPS and Headers
43 
44```text
45Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
46X-Content-Type-Options: nosniff
47X-Frame-Options: DENY
48Referrer-Policy: strict-origin-when-cross-origin
49Permissions-Policy: camera=(), microphone=(), geolocation=()
50```
51 
52## Forms
53 
54- CSRF protection on state-changing forms
55- Rate limiting on submission endpoints
56- Validate client and server side
57- Prefer honeypots or light anti-abuse controls over heavy-handed CAPTCHA defaults
58 

Sections

  • Web Security Rules
  • Content Security Policy
  • Nonce-Based CSP
  • XSS Prevention
  • Third-Party Scripts
  • HTTPS and Headers
  • Forms

What it covers

code-stylesecuritydependenciesdo-not

Stack — with the evidence

javascript

(0.80)

csharp

(0.60)

dotnet

(0.60)

github-actions

(0.60)

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
ThanhTrunggDEV
Language
—
License
—
Archived
no

All configs in this repo

Also in ThanhTrunggDEV/DontBeLazy

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
ThanhTrunggDEV/DontBeLazy.cursor/rules/zh-agents.mdc · 6Cursor rulesjavascriptcsharp+2no sections50/1003 days ago
ThanhTrunggDEV/DontBeLazy.cursor/rules/zh-patterns.mdc · 6Cursor rulesjavascriptcsharp+2api30/1003 days ago
ThanhTrunggDEV/DontBeLazy.agent/AGENTS.md · 6AGENTS.mdjavascriptcsharp+2buildteststylearch+477/1003 days ago
ThanhTrunggDEV/DontBeLazy.cursor/AGENTS.md · 6AGENTS.mdjavascriptcsharp+2buildteststylearch+477/1003 days ago
ThanhTrunggDEV/DontBeLazy.cursor/rules/common-agents.mdc · 6Cursor rulesjavascriptcsharp+2agent-behaviour50/1003 days ago
ThanhTrunggDEV/DontBeLazy.cursor/rules/common-code-review.mdc · 6Cursor rulesjavascriptcsharp+2styletesting-strategygitsecurity+365/1003 days ago
ThanhTrunggDEV/DontBeLazy.cursor/rules/common-coding-style.mdc · 6Cursor rulesjavascriptcsharp+2style54/1003 days ago
ThanhTrunggDEV/DontBeLazy.cursor/rules/common-development-workflow.mdc · 6Cursor rulesjavascriptcsharp+2gitagent-behaviour39/1003 days ago
ThanhTrunggDEV/DontBeLazy.cursor/rules/common-git-workflow.mdc · 6Cursor rulesjavascriptcsharp+2lint-formatgitagent-behaviour43/1003 days ago
ThanhTrunggDEV/DontBeLazy.cursor/rules/common-hooks.mdc · 6Cursor rulesjavascriptcsharp+2styletypessecuritydo-not36/1003 days ago
ThanhTrunggDEV/DontBeLazy.cursor/rules/common-patterns.mdc · 6Cursor rulesjavascriptcsharp+2lint-formatstyleapi52/1003 days ago
ThanhTrunggDEV/DontBeLazy.cursor/rules/common-performance.mdc · 6Cursor rulesjavascriptcsharp+2buildperformance48/1003 days ago
ThanhTrunggDEV/DontBeLazy.cursor/rules/common-security.mdc · 6Cursor rulesjavascriptcsharp+2security39/1003 days ago
ThanhTrunggDEV/DontBeLazy.cursor/rules/common-testing.mdc · 6Cursor rulesjavascriptcsharp+2testtesting-strategyagent-behaviour34/1003 days ago
ThanhTrunggDEV/DontBeLazy.cursor/rules/cpp-coding-style.mdc · 6Cursor rulesjavascriptcsharp+2lint-formatstyle52/1003 days ago
ThanhTrunggDEV/DontBeLazy.cursor/rules/cpp-hooks.mdc · 6Cursor rulesjavascriptcsharp+2buildlint-formatdeployment60/1003 days ago
ThanhTrunggDEV/DontBeLazy.cursor/rules/cpp-patterns.mdc · 6Cursor rulesjavascriptcsharp+2style54/1003 days ago
ThanhTrunggDEV/DontBeLazy.cursor/rules/cpp-security.mdc · 6Cursor rulesjavascriptcsharp+2securityperformancedo-not73/1003 days ago
ThanhTrunggDEV/DontBeLazy.cursor/rules/cpp-testing.mdc · 6Cursor rulesjavascriptcsharp+2testtesting-strategy55/1003 days ago
ThanhTrunggDEV/DontBeLazy.cursor/rules/csharp-coding-style.mdc · 6Cursor rulesjavascriptcsharp+2lint-formatstyletypes66/1003 days ago
Diff against .cursor/rules/zh-agents.mdc Diff against .cursor/rules/zh-patterns.mdc Diff against .agent/AGENTS.md Diff against .cursor/AGENTS.md Diff against .cursor/rules/common-agents.mdc Diff against .cursor/rules/common-code-review.mdc Diff against .cursor/rules/common-coding-style.mdc Diff against .cursor/rules/common-development-workflow.mdc Diff against .cursor/rules/common-git-workflow.mdc Diff against .cursor/rules/common-hooks.mdc Diff against .cursor/rules/common-patterns.mdc Diff against .cursor/rules/common-performance.mdc Diff against .cursor/rules/common-security.mdc Diff against .cursor/rules/common-testing.mdc Diff against .cursor/rules/cpp-coding-style.mdc Diff against .cursor/rules/cpp-hooks.mdc Diff against .cursor/rules/cpp-patterns.mdc Diff against .cursor/rules/cpp-security.mdc Diff against .cursor/rules/cpp-testing.mdc Diff against .cursor/rules/csharp-coding-style.mdc

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1Cursor rulestypescriptnextjs+5setuptestlint-formatstyle+799/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack