@arifbiswas/git-pre-push 1.0.11 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arifbiswas/git-pre-push",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "Zero-dependency pre-push security guard that stops malware, injected scripts, and leaked secrets from reaching GitHub.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/action.js CHANGED
@@ -25,8 +25,10 @@ jobs:
25
25
  node-version: '20'
26
26
 
27
27
  - name: Run GitSafty Security Audit
28
+ # Scoped package name: an unscoped "git-safty" does not exist on npm
29
+ # and could be registered by anyone.
28
30
  run: |
29
- npx git-safty scan
31
+ npx --yes @arifbiswas/git-pre-push scan --no-clean
30
32
  `;
31
33
 
32
34
  /**
package/src/installer.js CHANGED
@@ -9,7 +9,8 @@ const HOOK_TYPES = ['pre-push', 'post-checkout', 'post-merge'];
9
9
 
10
10
  // Absolute path of this installation's CLI, baked into the hook so a cloned
11
11
  // repository can never substitute its own ./bin/cli.js or node_modules copy.
12
- const CLI_PATH = path.resolve(__dirname, '..', 'bin', 'cli.js');
12
+ // Forward slashes so Git for Windows' sh can test and run the path too.
13
+ const CLI_PATH = path.resolve(__dirname, '..', 'bin', 'cli.js').replace(/\\/g, '/');
13
14
 
14
15
  function shellQuote(value) {
15
16
  return `'${String(value).replace(/'/g, `'\\''`)}'`;