From c6ea5ecfbbb563126e815f4fc22528319ab9f323 Mon Sep 17 00:00:00 2001 From: Katrina Liu Date: Wed, 17 Dec 2025 11:54:03 -0800 Subject: [PATCH 1/3] fix semgrep-version not accessible by plugin --- plugin/commands/setup_semgrep_plugin.md | 2 +- plugin/scripts/check_version.sh | 2 +- semgrep-version | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 semgrep-version diff --git a/plugin/commands/setup_semgrep_plugin.md b/plugin/commands/setup_semgrep_plugin.md index 16997ff..86d015a 100644 --- a/plugin/commands/setup_semgrep_plugin.md +++ b/plugin/commands/setup_semgrep_plugin.md @@ -16,7 +16,7 @@ You are setting up Semgrep for Claude Code. Do the following in order and confir 4) Report back: - Confirm Semgrep login/install status by running `semgrep --pro --version` -- Also check the Semgrep version in `${CLAUDE_PLUGIN_ROOT}/../semgrep-version` is lower +- Also check the Semgrep version in `${CLAUDE_PLUGIN_ROOT}/semgrep-version` is lower than or equal to the version installed. 5) Tell the user that they are all set for using the Semgrep Plugin! diff --git a/plugin/scripts/check_version.sh b/plugin/scripts/check_version.sh index 8ef50f2..1f2aad3 100755 --- a/plugin/scripts/check_version.sh +++ b/plugin/scripts/check_version.sh @@ -1,7 +1,7 @@ #!/bin/bash # Path to required version file -REQUIRED_VERSION_FILE="${CLAUDE_PLUGIN_ROOT}/../semgrep-version" +REQUIRED_VERSION_FILE="${CLAUDE_PLUGIN_ROOT}/semgrep-version" REQUIRED_VERSION=$(cat "$REQUIRED_VERSION_FILE" 2>/dev/null || echo "unknown") # Get installed Semgrep version diff --git a/semgrep-version b/semgrep-version deleted file mode 100644 index 1f5c7c5..0000000 --- a/semgrep-version +++ /dev/null @@ -1 +0,0 @@ -1.145.0 \ No newline at end of file From 40a1e6700350297e67f65616313a4b6d25a432bc Mon Sep 17 00:00:00 2001 From: Katrina Liu Date: Wed, 17 Dec 2025 11:56:12 -0800 Subject: [PATCH 2/3] fix workflow --- .github/workflows/test.yml | 2 +- plugin/semgrep-version | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 plugin/semgrep-version diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f0f272a..ee85f0a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,7 +34,7 @@ jobs: - name: Read minimum Semgrep version id: read-version run: | - VERSION=$(cat semgrep-version) + VERSION=$(cat plugin/semgrep-version) echo "version=$VERSION" >> $GITHUB_OUTPUT echo "Minimum Semgrep version: $VERSION" diff --git a/plugin/semgrep-version b/plugin/semgrep-version new file mode 100644 index 0000000..1f5c7c5 --- /dev/null +++ b/plugin/semgrep-version @@ -0,0 +1 @@ +1.145.0 \ No newline at end of file From 24a7f6051e199999c8718710922b1efae401266d Mon Sep 17 00:00:00 2001 From: Katrina Liu Date: Wed, 17 Dec 2025 11:56:42 -0800 Subject: [PATCH 3/3] bump version --- CHANGELOG.md | 3 +++ plugin/.claude-plugin/plugin.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84b59a7..458b977 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # Change Log +## 0.3.0 +Fixed bug in SessionStart hook + ## 0.2.0 Added a SessionStart hook for checking Semgrep version compatability diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.json index 9ac05ce..f41d8fc 100644 --- a/plugin/.claude-plugin/plugin.json +++ b/plugin/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "semgrep-plugin", "description": "Plugin by Semgrep. Allows Claude to use Semgrep via the MCP, hooks, and commands.", - "version": "0.2.0", + "version": "0.3.0", "author": { "name": "Semgrep" }