hardstop 1.4.2 → 1.4.4

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.
@@ -1,72 +1,38 @@
1
1
  {
2
- "$schema": "https://claude.ai/schemas/plugin-manifest-v1.json",
3
2
  "name": "hardstop",
4
- "version": "1.4.2",
5
- "description": "Pre-execution safety layer that blocks dangerous shell commands and credential file reads using pattern matching + LLM analysis. Fail-closed design.",
6
- "author": "Francesco Marinoni Moretto",
7
- "license": "CC-BY-4.0",
8
- "repository": "https://github.com/frmoretto/hardstop",
9
- "homepage": "https://github.com/frmoretto/hardstop",
10
- "keywords": [
11
- "hardstop",
12
- "safety",
13
- "security",
14
- "pre-execution",
15
- "shell",
16
- "bash",
17
- "powershell",
18
- "command-blocking",
19
- "ai-safety",
20
- "guardrails"
21
- ],
22
- "skills": [
23
- {
24
- "name": "hs",
25
- "path": "skills/hs/SKILL.md",
26
- "triggers": [
27
- "hardstop",
28
- "safety check",
29
- "pre-execution check",
30
- "is this command safe",
31
- "check command safety"
32
- ]
33
- }
34
- ],
35
- "hooks": {
36
- "PreToolUse": [
37
- {
38
- "matcher": "Bash",
39
- "command": "python hooks/pre_tool_use.py",
40
- "description": "Pre-execution safety verification for shell commands"
41
- },
42
- {
43
- "matcher": "PowerShell",
44
- "command": "python hooks/pre_tool_use.py",
45
- "description": "Pre-execution safety verification for PowerShell commands"
46
- },
47
- {
48
- "matcher": "Read",
49
- "command": "python hooks/pre_read.py",
50
- "description": "Pre-read credential file protection"
51
- }
52
- ]
3
+ "metadata": {
4
+ "description": "Pre-execution safety layer for Claude Code",
5
+ "version": "1.0.0"
53
6
  },
54
- "commands": [
7
+ "owner": {
8
+ "name": "Francesco Marinoni Moretto",
9
+ "email": "contact@clarity-gate.org"
10
+ },
11
+ "plugins": [
55
12
  {
56
13
  "name": "hs",
57
- "aliases": ["hardstop"],
58
- "description": "Control Hardstop plugin",
59
- "subcommands": [
60
- {"name": "on", "description": "Enable protection"},
61
- {"name": "off", "description": "Disable protection"},
62
- {"name": "skip", "description": "Skip next N commands (default 1)"},
63
- {"name": "status", "description": "Show current state"},
64
- {"name": "log", "description": "View audit log"}
14
+ "source": "./",
15
+ "description": "Pre-execution safety layer that blocks dangerous shell commands and credential file reads using pattern matching + LLM analysis. Fail-closed design.",
16
+ "version": "1.4.4",
17
+ "author": {
18
+ "name": "Francesco Marinoni Moretto",
19
+ "email": "contact@clarity-gate.org"
20
+ },
21
+ "homepage": "https://github.com/frmoretto/hardstop",
22
+ "repository": "https://github.com/frmoretto/hardstop",
23
+ "license": "CC-BY-4.0",
24
+ "keywords": [
25
+ "safety",
26
+ "security",
27
+ "pre-execution",
28
+ "shell",
29
+ "bash",
30
+ "powershell",
31
+ "command-blocking",
32
+ "ai-safety",
33
+ "guardrails",
34
+ "fail-closed"
65
35
  ]
66
36
  }
67
- ],
68
- "compatibility": {
69
- "claude-code": ">=1.0.0",
70
- "claude-desktop": ">=1.0.0"
71
- }
37
+ ]
72
38
  }
@@ -1,16 +1,13 @@
1
1
  {
2
2
  "name": "hs",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "Pre-execution safety layer that blocks dangerous shell commands and credential file reads using pattern matching + LLM analysis. Fail-closed design.",
5
5
  "author": {
6
6
  "name": "Francesco Marinoni Moretto",
7
7
  "email": "contact@clarity-gate.org"
8
8
  },
9
9
  "homepage": "https://github.com/frmoretto/hardstop",
10
- "repository": {
11
- "type": "git",
12
- "url": "https://github.com/frmoretto/hardstop.git"
13
- },
10
+ "repository": "https://github.com/frmoretto/hardstop",
14
11
  "license": "CC-BY-4.0",
15
12
  "keywords": [
16
13
  "safety",
package/CHANGELOG.md CHANGED
@@ -2,6 +2,35 @@
2
2
 
3
3
  All notable changes to Hardstop will be documented in this file.
4
4
 
5
+ ## [1.4.4] - 2026-02-17
6
+
7
+ ### Fixed
8
+ - **commands/hs.md**: Pass `$ARGUMENTS` instead of hardcoded `skip` for skip/bypass handler, so `hs bypass` correctly forwards the argument
9
+ - **commands/skip.md**: Forward `$ARGUMENTS` to `hs_cmd.py` so `/skip` passes through any user-supplied arguments
10
+
11
+ ---
12
+
13
+ ## [1.4.3] - 2026-02-14
14
+
15
+ ### Growth Features
16
+
17
+ Adds GitHub star calls-to-action at key user touchpoints.
18
+
19
+ ### Added
20
+ - **bin/postinstall.js**: Post-install message with GitHub star CTA
21
+ - Shows after `npm install hardstop`
22
+ - Welcomes users and directs to quick start
23
+ - **hooks/pre_tool_use.py**: First-block celebration message
24
+ - Shows once per installation after first blocked command
25
+ - "šŸŽ‰ Hardstop just protected you!" with star link
26
+ - **commands/hs_cmd.py**: GitHub star CTA in `/hs status` output
27
+ - Reminds users to star when checking status
28
+ - **README.md**: GitHub stars badge and prominent CTA
29
+ - Social proof badge showing current star count
30
+ - "šŸ‘‰ Star on GitHub if Hardstop keeps you safe!"
31
+
32
+ ---
33
+
5
34
  ## [1.4.2] - 2026-02-14
6
35
 
7
36
  ### UX Workflow Enhancement & Ecosystem Cross-Links
package/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/hardstop.svg)](https://www.npmjs.com/package/hardstop)
4
4
  [![npm downloads](https://img.shields.io/npm/dm/hardstop.svg)](https://www.npmjs.com/package/hardstop)
5
+ [![GitHub stars](https://img.shields.io/github/stars/frmoretto/hardstop?style=social)](https://github.com/frmoretto/hardstop/stargazers)
5
6
  [![license](https://img.shields.io/npm/l/hardstop.svg)](LICENSE)
6
7
  [![node](https://img.shields.io/node/v/hardstop.svg)](https://www.npmjs.com/package/hardstop)
7
8
  [![Tests](https://github.com/frmoretto/hardstop/workflows/Tests/badge.svg)](https://github.com/frmoretto/hardstop/actions/workflows/test.yml)
@@ -10,6 +11,8 @@
10
11
  [![Platform](https://img.shields.io/badge/platform-macOS_%7C_Linux_%7C_Windows-lightgrey)](https://github.com/frmoretto/hardstop)
11
12
  [![SLSA Provenance](https://img.shields.io/badge/SLSA-Build_Provenance-green?logo=sigstore)](https://github.com/frmoretto/hardstop/attestations)
12
13
 
14
+ > šŸ‘‰ **[⭐ Star on GitHub](https://github.com/frmoretto/hardstop)** if Hardstop keeps you safe!
15
+
13
16
  Pre-execution safety validation for AI coding agents. Validates every shell command against 428 security patterns before execution — blocking destructive operations, credential theft, infrastructure teardown, and prompt injection. Fail-closed: blocks by default when uncertain.
14
17
 
15
18
  **Ecosystem:** The detection patterns are published separately as [hardstop-patterns](https://www.npmjs.com/package/hardstop-patterns) ([GitHub](https://github.com/frmoretto/hardstop-patterns)) — reusable in any Node.js tool.
@@ -46,7 +49,7 @@ $ Read ~/.aws/credentials
46
49
 
47
50
  # You check the status
48
51
  $ /hs status
49
- Hardstop v1.4.2
52
+ Hardstop v1.4.3
50
53
  Status: 🟢 Enabled
51
54
  Session Risk: Moderate (35/100)
52
55
  Blocked: 2 commands this session
@@ -154,7 +157,7 @@ powershell -ExecutionPolicy Bypass -File install.ps1
154
157
 
155
158
  You should see:
156
159
  ```
157
- Hardstop v1.4.2
160
+ Hardstop v1.4.3
158
161
  Status: 🟢 Enabled
159
162
  Session Risk: Low (0/100)
160
163
  262 patterns loaded (MITRE ATT&CK mapped)
package/bin/install.js CHANGED
@@ -263,7 +263,7 @@ function getVersion() {
263
263
  } catch (e) {
264
264
  // Ignore errors
265
265
  }
266
- return 'v1.4.2';
266
+ return 'v1.4.3';
267
267
  }
268
268
 
269
269
  // Main installation flow
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+
3
+ console.log('\nāœ… Hardstop installed successfully!\n');
4
+ console.log('šŸ›”ļø Your commands are now protected.\n');
5
+ console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
6
+ console.log('⭐ Star us on GitHub:');
7
+ console.log(' https://github.com/frmoretto/hardstop\n');
8
+ console.log('šŸ“š Quick start: npx hardstop install');
9
+ console.log('šŸ“– Documentation: https://github.com/frmoretto/hardstop#readme');
10
+ console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
package/commands/hs.md CHANGED
@@ -40,7 +40,7 @@ python "${CLAUDE_PLUGIN_ROOT}/commands/hs_cmd.py" off
40
40
  ### If argument is "skip" or "bypass":
41
41
  Use `/skip` command instead, or run:
42
42
  ```bash
43
- python "${CLAUDE_PLUGIN_ROOT}/commands/hs_cmd.py" skip
43
+ python "${CLAUDE_PLUGIN_ROOT}/commands/hs_cmd.py" $ARGUMENTS
44
44
  ```
45
45
 
46
46
  ### If argument is "log" or "logs" or "audit":
@@ -153,6 +153,11 @@ def cmd_status():
153
153
  except Exception:
154
154
  pass
155
155
 
156
+ # GitHub star CTA
157
+ print()
158
+ print(" ⭐ Enjoying Hardstop? Star us on GitHub!")
159
+ print(" https://github.com/frmoretto/hardstop")
160
+
156
161
 
157
162
  def cmd_log():
158
163
  """Show recent audit log entries."""
package/commands/skip.md CHANGED
@@ -12,7 +12,7 @@ Set a one-time bypass flag so the next shell command skips the safety check.
12
12
  Run this command to set the skip flag:
13
13
 
14
14
  ```bash
15
- python "${CLAUDE_PLUGIN_ROOT}/commands/hs_cmd.py" skip
15
+ python "${CLAUDE_PLUGIN_ROOT}/commands/hs_cmd.py" skip $ARGUMENTS
16
16
  ```
17
17
 
18
18
  Then inform the user that the next command will bypass safety checks, but protection will resume automatically after that.
@@ -788,6 +788,19 @@ def block_command(message: str, command: str, layer: str, cwd: str, pattern_data
788
788
  }
789
789
 
790
790
  print(json.dumps(output))
791
+
792
+ # Show first-block message (once per installation)
793
+ first_block_file = STATE_DIR / "first_block_shown"
794
+ if not first_block_file.exists():
795
+ try:
796
+ print("\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━", file=sys.stderr)
797
+ print("šŸŽ‰ Hardstop just protected you from a dangerous command!", file=sys.stderr)
798
+ print("⭐ Enjoying it? Star us: https://github.com/frmoretto/hardstop", file=sys.stderr)
799
+ print("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n", file=sys.stderr)
800
+ first_block_file.touch()
801
+ except:
802
+ pass # Don't fail if we can't write
803
+
791
804
  sys.exit(0)
792
805
 
793
806
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hardstop",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "Pre-execution safety layer for Claude Code - blocks dangerous commands before they run. Part of the Hardstop ecosystem.",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "scripts": {
63
63
  "test": "echo \"Use pytest for testing: cd hardstop && pytest tests/\"",
64
- "postinstall": "echo \"Run 'npx hardstop install' to install the plugin\""
64
+ "postinstall": "node bin/postinstall.js"
65
65
  },
66
66
  "dependencies": {},
67
67
  "devDependencies": {}
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: hs
3
- version: "1.3"
3
+ version: "1.4"
4
4
  description: "ACTIVATE THIS SKILL FOR ANY SHELL COMMAND OR FILE READ. Check curl, wget, rm, sudo, apt, dpkg, chmod, dd, format, powershell, bash, sh. Check pipe patterns like | sh or | bash. Check shell wrappers like bash -c, xargs, find -exec. Check cloud CLI (aws, gcloud, kubectl, terraform). Check when user says sysadmin told me, Stack Overflow says, is this safe, can I run. Block reading of .env, .ssh, .aws, and credential files. This skill blocks dangerous commands and warns on risky ones. ALWAYS apply the safety protocol from this document before responding about any command."
5
5
  author: Francesco Marinoni Moretto
6
6
  license: CC-BY-4.0