Skip to content

Add documentation and fix Dependabot and CodeQL alerts - #355

Merged
aamoghS merged 2 commits into
mainfrom
cursor/docs-and-security-5089
Aug 16, 2026
Merged

Add documentation and fix Dependabot and CodeQL alerts#355
aamoghS merged 2 commits into
mainfrom
cursor/docs-and-security-5089

Conversation

@aamoghS

@aamoghS aamoghS commented Aug 16, 2026

Copy link
Copy Markdown
Member

Single commit thread, authored by aamoghS, combining the docs work and the security fixes. Replaces #352 and #354.

Documentation

docs/ covers architecture, local setup, packages, both sites, CI/CD, deployment, security, and testing. Root and package READMEs point there.

Security / CodeQL

  • Remove image-size (no patched npm release); JPEG/PNG/WebP-only dimension parser
  • sanitize-html 2.17.5, PostCSS 8.5.23, brace-expansion 5.0.9
  • Linear markup scan instead of polynomial regexes
  • Strip control characters from CSP and Stripe log lines
  • Ignore cursor/** in the feature-to-dev auto-PR workflow

Review follow-up (b4aa605)

  • Reject slash-separated handlers (<div/onmouseover=…>), matching the old \bon word boundary
  • CSP logs strip C0 controls, DEL, and Unicode line separators (CodeQL log-injection)
  • Stripe membership-grant failures log a sanitized name: message, not only Error
Open in Web Open in Cursor 

Document the monorepo (packages, sites, operations) and close the
open security findings: drop unpatched image-size, bump sanitize-html,
PostCSS, and brace-expansion, replace polynomial markup regexes, and
strip CR/LF from CSP and Stripe logs. Ignore cursor/* in the
feature-to-dev auto-PR workflow.

Co-authored-by: Aamogh <aamoghS@users.noreply.github.com>
@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Aug 16, 2026
@aamoghS
aamoghS marked this pull request as ready for review August 16, 2026 15:53
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 1 package(s) with unknown licenses.
See the Details below.

License Issues

sites/mainweb/package.json

PackageVersionLicenseIssue Type
sanitize-html^2.17.5NullUnknown License

OpenSSF Scorecard

PackageVersionScoreDetails
npm/sanitize-html 2.17.5 🟢 6.4
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
License⚠️ 0license file not detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Security-Policy🟢 9security policy file detected
Fuzzing⚠️ 0project is not fuzzed
SAST🟢 9SAST tool is not run on all commits -- score normalized to 9
npm/brace-expansion 5.0.9 🟢 7.2
Details
CheckScoreReason
Code-Review🟢 3Found 6/16 approved changesets -- score normalized to 3
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Maintained🟢 1024 commit(s) and 15 issue activity found in the last 90 days -- score normalized to 10
Binary-Artifacts🟢 10no binaries found in the repo
Security-Policy🟢 10security policy file detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Packaging⚠️ -1packaging workflow not detected
Pinned-Dependencies🟢 10all dependencies are pinned
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 9license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/sanitize-html 2.17.5 🟢 6.4
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
License⚠️ 0license file not detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Security-Policy🟢 9security policy file detected
Fuzzing⚠️ 0project is not fuzzed
SAST🟢 9SAST tool is not run on all commits -- score normalized to 9
npm/postcss 8.5.23 🟢 7.4
Details
CheckScoreReason
Code-Review🟢 3Found 9/30 approved changesets -- score normalized to 3
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Maintained🟢 1030 commit(s) and 15 issue activity found in the last 90 days -- score normalized to 10
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions🟢 9detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies🟢 10all dependencies are pinned
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Fuzzing🟢 10project is fuzzed
Branch-Protection🟢 3branch protection is not maximal on development and all release branches
Signed-Releases⚠️ -1no releases found
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/postcss 8.5.23 🟢 7.4
Details
CheckScoreReason
Code-Review🟢 3Found 9/30 approved changesets -- score normalized to 3
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Maintained🟢 1030 commit(s) and 15 issue activity found in the last 90 days -- score normalized to 10
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions🟢 9detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies🟢 10all dependencies are pinned
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Fuzzing🟢 10project is fuzzed
Branch-Protection🟢 3branch protection is not maximal on development and all release branches
Signed-Releases⚠️ -1no releases found
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/sanitize-html ^2.17.5 UnknownUnknown
npm/postcss 8.5.23 🟢 7.4
Details
CheckScoreReason
Code-Review🟢 3Found 9/30 approved changesets -- score normalized to 3
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Maintained🟢 1030 commit(s) and 15 issue activity found in the last 90 days -- score normalized to 10
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions🟢 9detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies🟢 10all dependencies are pinned
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Fuzzing🟢 10project is fuzzed
Branch-Protection🟢 3branch protection is not maximal on development and all release branches
Signed-Releases⚠️ -1no releases found
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0

Scanned Files

  • packages/api/package.json
  • pnpm-lock.yaml
  • sites/hacklytics2027/package.json
  • sites/mainweb/package.json
  • tooling/tailwind/package.json

@github-actions

github-actions Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Visit the preview URL for this PR (updated for commit b4aa605):

https://hacklytics2027--pr-355-hfqp9dia.web.app

(expires Sun, 23 Aug 2026 16:05:44 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c48ba34db61581e25fe2978355160b5eefe0e83f

Comment thread sites/mainweb/app/api/csp-report/route.ts
@greptile-apps

greptile-apps Bot commented Aug 16, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds comprehensive repository documentation and addresses dependency and static-analysis alerts.

  • Replaces the vulnerable image-dimension dependency with a bounded JPEG, PNG, and WebP parser.
  • Reworks markup scanning to avoid polynomial regex behavior and now detects slash-separated inline handlers.
  • Updates affected dependencies, sanitizes security-related log lines, and adjusts branch automation.

Confidence Score: 5/5

The PR appears safe to merge because the previously reported handler-boundary bypass is fixed and no blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
packages/api/src/trpc.ts The revised boundary check now treats slash separators correctly and closes the previously reported sanitizer bypass.
packages/api/src/.internal-tests/security.test.ts Adds focused regression coverage for slash-separated onmouseover and onload handlers.
packages/api/src/services/image-dimensions.ts Introduces a bounded parser for the three supported profile-image formats instead of the vulnerable dependency.
pnpm-lock.yaml Records the dependency removals and patched package resolutions associated with the security updates.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[tRPC input] --> B[scrubMarkup]
  B --> C[hasDangerousMarkup]
  C --> D{Inline handler found?}
  D -->|Yes| E[Reject request]
  D -->|No| F[Continue procedure]
Loading

Reviews (2): Last reviewed commit: "Address PR review: handler scan, CSP log..." | Re-trigger Greptile

Comment thread packages/api/src/trpc.ts Outdated

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 76a8ad5. Configure here.

Comment thread packages/api/src/trpc.ts Outdated
Comment thread sites/mainweb/app/(portal)/api/webhooks/stripe/route.ts Outdated
Reject slash-separated inline handlers to match the old word-boundary
regex, strip all control characters from CSP report logs, and keep a
newline-safe Stripe error message for membership-grant failures.

Co-authored-by: Aamogh <aamoghS@users.noreply.github.com>
@aamoghS
aamoghS merged commit 12b28c8 into main Aug 16, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants