Skip to content

Harden auth flows and pin CI dependencies - #11

Draft
Aswinmcw with Copilot wants to merge 5 commits into
mainfrom
copilot/fix-security-vulnerabilities
Draft

Aswinmcw with Copilot wants to merge 5 commits into
mainfrom
copilot/fix-security-vulnerabilities

Conversation

Copilot AI commented Oct 12, 2026 •

Copy link
Copy Markdown

This audit addresses authentication flaws, unsafe CI dependency references, and malformed credential handling across the repository. Safe fixes are included; broader behavioural changes remain documented for follow-up.

  • Authentication fixes

    • Prevent signup requests from overwriting passwords for verified accounts.
    • Require the explicit delete my account confirmation phrase before account removal.
    • Make malformed password hashes fail closed instead of throwing.
    if (existing.email_verified === 0) {
      await updateUserPasswordHash(db, existing.id, hash);
    }
  • CI supply-chain hardening

    • Pin actions/checkout, actions/setup-node, and the reusable auto-approve workflow to verified commit SHAs.
  • Report-only findings

    • Password-reset tokens remain reusable until expiry; fixing this requires token persistence/versioning and session invalidation.
    • The publish workflow installs npm@latest; it remains unpinned because the advisory scan found the required npm versions affected.
    • No hard-coded secrets were found.
Original prompt

Please review this repository and open one pull request with findings and fixes.

Scope

  1. Security: hard-coded secrets, API keys or tokens (including in history-visible config, examples and tests); injection (SQL, command, template, path traversal); missing authentication or authorisation checks; unsafe deserialisation; SSRF; open redirects; weak crypto; insecure CORS or headers; webhook signature verification; secrets in logs.
  2. Dependencies: known-vulnerable or abandoned packages, unpinned or overly broad versions.
  3. CI and GitHub Actions: pull_request_target misuse, untrusted input in run: steps, actions not pinned to a SHA, overly broad permissions:, secrets exposed to forks.
  4. Bugs and reliability: unhandled errors, race conditions, resource leaks, broken edge cases.
  5. Maintainability: dead code, missing tests for risky paths, unclear configuration.

How to report

  • Fix what is safe and clearly correct in the PR, each fix in its own commit with a clear message.
  • For anything risky, a behaviour change, or a judgement call, do not change it: list it in the PR description instead.
  • In the PR description, include a table of findings: severity (critical / high / medium / low), file and line, what is wrong, and whether it was fixed or only reported.
  • If a secret is found, do not print its value; say where it is and that it must be rotated.
  • Keep the PR small and reviewable. Do not reformat unrelated code.
  • If nothing significant is found, say so in the PR and keep changes minimal.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Copilot AI and others added 4 commits October 12, 2026 05:14
Co-authored-by: Aswinmcw <156493059+Aswinmcw@users.noreply.github.com>
Co-authored-by: Aswinmcw <156493059+Aswinmcw@users.noreply.github.com>
Co-authored-by: Aswinmcw <156493059+Aswinmcw@users.noreply.github.com>
Co-authored-by: Aswinmcw <156493059+Aswinmcw@users.noreply.github.com>
Copilot AI changed the title [WIP] Review security and dependency issues in repository Harden auth flows and pin CI dependencies Oct 12, 2026
Copilot AI requested a review from Aswinmcw October 12, 2026 05:18
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