Skip to content

Add security tests and baseline security headers - #23

Merged
Munishwar001 merged 1 commit into
devfrom
feature/security-tests
Nov 5, 2026
Merged

Munishwar001 merged 1 commit into
devfrom
feature/security-tests

Conversation

@Munishwar001

Copy link
Copy Markdown
Owner

What

Adds an automated security test suite and baseline security headers, and updates the docs and Privacy Policy to match.

Changes

  • tests/api/security.test.mjs (24 tests): anonymous access, CSRF, cookie flags, login lockout, no secret or hash leaks, cross-user access, hostile input, admin routes, headers.
  • next.config.ts: adds nosniff, X-Frame-Options, Referrer-Policy and Permissions-Policy, and removes X-Powered-By.
  • tests/helpers.mjs, tests/README.md: helper and docs for the new suite.
  • Docs and Privacy Policy: describe the tests and say no independent review or pen test has been done.

Notes

  • Regression checks only, not a substitute for a pen test.
  • No CSP yet; it needs separate tuning.

Testing

  • tsc and eslint pass.
  • The security suite passed 24/24 before the final refactor. After it, 4 sign-in tests could not run because the signup rate limit (10 per hour) was used up locally. Please re-run npm test after it resets, and run npm run build.

Copilot AI balanced review requested due to automatic review settings November 5, 2026 05:31
@vercel

vercel Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
dotkeep Ready Ready Preview Nov 5, 2026 5:31am UTC

@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 19 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e2de0e1a-5413-4308-a62a-a3d638016639
Commits

Reviewing files that changed from the base of the PR and between 9fa71c9 and eb7bc0f.

Files selected for processing: 6

  • next.config.ts
  • src/app/docs/page.tsx
  • src/app/privacy/page.tsx
  • tests/README.md
  • tests/api/security.test.mjs
  • tests/helpers.mjs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@coderabbitai

coderabbitai Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Add Carrot credits or activate Agent usage billing to use Autofix

@Munishwar001
Munishwar001 merged commit e7aa8bd into dev Nov 5, 2026
4 checks passed
@Munishwar001 Munishwar001 mentioned this pull request Nov 13, 2026
Merged
3 tasks

This branch was successfully deployed

1 active deployment
Preview — eb7bc0f6 Deployed Nov 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants