Skip to content

chore: save workspace changes - #22

Open
btfcookies wants to merge 4 commits into
prodfrom
agents/automate-security-checks-on-commit
Open

chore: save workspace changes#22
btfcookies wants to merge 4 commits into
prodfrom
agents/automate-security-checks-on-commit

Conversation

@btfcookies

Copy link
Copy Markdown
Member

No description provided.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 4, 2026 15:30
@netlify

netlify Bot commented Jun 4, 2026

Copy link
Copy Markdown

Deploy Preview for cortis-app ready!

Name Link
🔨 Latest commit 89c78ba
🔍 Latest deploy log https://app.netlify.com/projects/cortis-app/deploys/6a219d20d2182b00081e41ff
😎 Deploy Preview https://deploy-preview-22--cortis-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds tooling to set up a Husky-managed post-commit hook that runs npm audit (client/server) and a custom secret-scanning script against the latest commit diff, along with documentation updates describing the security checks.

Changes:

  • Add multiple setup entrypoints (.bat / PowerShell / Node / Python) intended to create .husky/post-commit and scripts/check-secrets.js.
  • Add a root package.json with Husky wired via the prepare script.
  • Update README.md to document the new security checks and project structure.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
setup.bat Runs the PowerShell setup script on Windows.
run-setup.bat Runs the Node-based setup script (currently via an absolute path).
setup-windows-ps.ps1 PowerShell script that writes the Husky hook and secret scanner.
setup-with-python.py Python script that writes the Husky hook and secret scanner.
setup-files.js Node script that writes the Husky hook and secret scanner.
package.json Adds root-level Husky dependency and prepare script.
README.md Documents the new hook-based security checks and updates structure/quick start text.
.gitignore Adds an ignore entry for a local scratch file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread setup-files.js Outdated
Comment thread setup-files.js Outdated
Comment thread run-setup.bat Outdated
Comment thread setup-with-python.py
Comment on lines +1 to +5
import os
import sys

base = r'c:\Users\Lawrence Tong\Desktop\Projects\cortis.worktrees\agents-automate-security-checks-on-commit'
os.chdir(base)
Comment thread setup-windows-ps.ps1
Comment on lines +1 to +2
$baseDir = 'c:\Users\Lawrence Tong\Desktop\Projects\cortis.worktrees\agents-automate-security-checks-on-commit'
cd $baseDir
Comment thread setup-windows-ps.ps1
echo ""
'@

Set-Content -Path '.\.husky\post-commit' -Value $postCommitContent -Encoding UTF8
Comment thread README.md
Comment on lines +29 to 33
scripts/ # Dev tooling scripts
check-secrets.js # Post-commit secret scanner
.husky/ # Git hooks (managed by Husky)
post-commit # Runs security checks after each commit
README.md
Comment thread README.md
Comment on lines +139 to +141
Hooks are installed automatically when you run `npm install` at the root (via the `prepare` script).

If a check fails, the commit is still recorded but a warning is printed so you can remediate before pushing.
Comment thread package.json
Comment on lines +7 to +11
"prepare": "husky"
},
"devDependencies": {
"husky": "^9.1.7"
}
Comment thread setup-files.js
Comment on lines +20 to +24
// Create .husky/post-commit
const postCommitContent = `#!/usr/bin/env sh

echo ""
echo "🔒 Running post-commit security checks..."
btfcookies and others added 3 commits June 4, 2026 17:42
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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