Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e5a7014
fix: replace Helmet frameguard:false with CSP frame-ancestors for ifr…
marcoscaceres Apr 15, 2026
18fca09
fix: add sliding-window rate limiting to /respec/size routes
marcoscaceres Apr 15, 2026
3e5cfe8
chore: suppress intentional code-injection false positive in xref fil…
marcoscaceres Apr 15, 2026
ebc3bcb
test: add tests for rate-limit utility and SSRF URL validation
marcoscaceres Apr 15, 2026
2aec526
chore: fix CodeQL suppression syntax; remove redundant comment in app.ts
marcoscaceres Apr 15, 2026
883d604
chore: simplify worker.js comment; alerts dismissed via security dash…
marcoscaceres Apr 15, 2026
ed58a57
fix(rate-limit): throw RangeError for invalid windowMs or max options
marcoscaceres Apr 15, 2026
d17e2de
revert: stop touching worker.js; alert #21 dismissed via dashboard, n…
marcoscaceres Apr 15, 2026
5de4946
fix(rate-limit): compute sliding-window Retry-After precisely
Copilot Apr 15, 2026
655c5eb
test: use os.tmpdir for DATA_DIR in env helper
Copilot Apr 15, 2026
a76fda1
test(rate-limit): stabilize Retry-After test spy usage
Copilot Apr 15, 2026
086b78e
test: restore Date.now spy cleanup in rate-limit specs
Copilot Apr 15, 2026
459944c
test: make Retry-After spy values fully deterministic
Copilot Apr 15, 2026
32c96aa
fix(helmet): disable frameguard so CSP frame-ancestors controls ifram…
marcoscaceres Apr 15, 2026
1144d0c
fix: tighten respec rate limit and remove realtime wait in test
Copilot Apr 15, 2026
78aa893
fix: keep precise Retry-After math and clarify mocked expiry timestamp
Copilot Apr 15, 2026
85787e9
fix: use express-rate-limit, tighten CSP and SSRF checks
marcoscaceres Apr 23, 2026
fcaea5a
fix: address Copilot review findings
marcoscaceres Apr 24, 2026
2f3802a
fix: address Sid's review comments
marcoscaceres Apr 24, 2026
07977a4
test: add smoke tests for rate-limit re-export
marcoscaceres Apr 24, 2026
9c5c53f
test: add behavior tests for rate limiting middleware
marcoscaceres Apr 24, 2026
e89ae29
fix: override html-minifier with html-minifier-terser
marcoscaceres Apr 24, 2026
087e94b
fix(helmet): remove frame-ancestors from default CSP
marcoscaceres Apr 24, 2026
ed82db5
test: assert Retry-After header on 429 response
marcoscaceres Apr 24, 2026
4e12de1
fix: reject non-https schemes in SSRF check, expand tests
marcoscaceres Apr 24, 2026
02cebe0
chore: regenerate lockfile after dep-updates merge
marcoscaceres Apr 25, 2026
5d7c182
fix: address Sid's review comments on PR #480
marcoscaceres Apr 25, 2026
44be310
refactor: replace tryURL with native URL.parse()
marcoscaceres Apr 25, 2026
fe7452a
refactor: inline express-rate-limit import, remove wrapper
marcoscaceres Apr 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,15 @@ registerViewEngine(app);

// Security
// Defaults https://www.npmjs.com/package/helmet#how-it-works
// ReSpec pill UI is embedded via iframe on any spec-hosting site,
// so we must not send frame-ancestors or X-Frame-Options.
const cspDirectives = helmet.contentSecurityPolicy.getDefaultDirectives();
delete cspDirectives["frame-ancestors"];

app.use(
helmet({
// Allow for UI inclusion as iframe in ReSpec pill.
frameguard: false,
contentSecurityPolicy: { directives: cspDirectives },
}),
);

Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"cors": "^2.8.6",
"dotenv": "^17.4.2",
"express": "^5.2.1",
"express-rate-limit": "^8.4.0",
"helmet": "^8.1.0",
"morgan": "^1.10.1",
"nanoid": "^5.1.9",
Expand All @@ -34,6 +35,11 @@
"update-data-sources": "node build/scripts/update-data-sources.js"
},
"packageManager": "pnpm@9.8.0",
"pnpm": {
"overrides": {
"html-minifier": "npm:html-minifier-terser@^7.2.0"
}
},
"simple-git-hooks": {
"post-merge": "pnpm i && pnpm build"
},
Expand Down
Loading
Loading