chore: save workspace changes - #22
Open
btfcookies wants to merge 4 commits into
Open
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
✅ Deploy Preview for cortis-app ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
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-commitandscripts/check-secrets.js. - Add a root
package.jsonwith Husky wired via thepreparescript. - Update
README.mdto 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 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 on lines
+1
to
+2
| $baseDir = 'c:\Users\Lawrence Tong\Desktop\Projects\cortis.worktrees\agents-automate-security-checks-on-commit' | ||
| cd $baseDir |
| echo "" | ||
| '@ | ||
|
|
||
| Set-Content -Path '.\.husky\post-commit' -Value $postCommitContent -Encoding UTF8 |
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 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 on lines
+7
to
+11
| "prepare": "husky" | ||
| }, | ||
| "devDependencies": { | ||
| "husky": "^9.1.7" | ||
| } |
Comment on lines
+20
to
+24
| // Create .husky/post-commit | ||
| const postCommitContent = `#!/usr/bin/env sh | ||
|
|
||
| echo "" | ||
| echo "🔒 Running post-commit security checks..." |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.