Skip to content

Commit 3913dbf

Browse files
authored
Upgrade 1.0.28 (#27)
* some changes required to properly upgrade to 1.0.27 that were missed in the previous PR * upgrade to 1.0.28 + add Claude skill for making version changes
1 parent 918e0f8 commit 3913dbf

9 files changed

Lines changed: 100 additions & 65 deletions

File tree

.claude/commands/bump-version.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Bump the project version. The bump type is: $ARGUMENTS (default to "patch" if empty or not one of: patch, minor, major).
2+
3+
Follow these steps exactly:
4+
5+
1. **Parse bump type**: Use "$ARGUMENTS". If blank or not one of `patch`, `minor`, `major`, default to `patch`.
6+
7+
2. **Read current version**: Read `pyproject.toml` and extract the current version from the `version = "X.Y.Z"` line.
8+
9+
3. **Compute new version**: Given current version `X.Y.Z`:
10+
- `patch``X.Y.(Z+1)`
11+
- `minor``X.(Y+1).0`
12+
- `major``(X+1).0.0`
13+
14+
4. **Update all version files**: Run the following Python command from the project root to invoke the existing hook logic, which updates `pyproject.toml`, `socket_basics/version.py`, and all doc files:
15+
```
16+
python3 -c "import importlib.util; spec = importlib.util.spec_from_file_location('version_check', '.hooks/version-check.py'); mod = importlib.util.module_from_spec(spec); spec.loader.exec_module(mod); mod.inject_version('NEW_VERSION')"
17+
```
18+
Replace `NEW_VERSION` with the computed version string.
19+
20+
5. **Update `socket_basics/__init__.py`**: This file is NOT handled by the hook. Use the Edit tool to replace the old `__version__ = "OLD"` line with `__version__ = "NEW_VERSION"`.
21+
22+
6. **Regenerate lock file**: Run `uv lock` to update `uv.lock` with the new version.
23+
24+
7. **Verify**: Use grep to confirm no remaining references to the OLD version in these files:
25+
- `pyproject.toml`
26+
- `socket_basics/version.py`
27+
- `socket_basics/__init__.py`
28+
- `uv.lock`
29+
- `README.md`
30+
- `docs/github-action.md`
31+
- `docs/pre-commit-hook.md`
32+
33+
8. **Report**: Summarize what version was bumped (OLD → NEW) and list all files that were modified.
34+
35+
Do NOT commit the changes. Just make the edits and report.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2828

2929
- name: Run Socket Basics
30-
uses: SocketDev/socket-basics@1.0.26
30+
uses: SocketDev/socket-basics@1.0.28
3131
env:
3232
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
3333
with:
@@ -112,7 +112,7 @@ Configure scanning policies, notification channels, and rule sets for your entir
112112

113113
**Dashboard-Configured (Enterprise):**
114114
```yaml
115-
- uses: SocketDev/socket-basics@1.0.26
115+
- uses: SocketDev/socket-basics@1.0.28
116116
env:
117117
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
118118
with:
@@ -123,7 +123,7 @@ Configure scanning policies, notification channels, and rule sets for your entir
123123

124124
**CLI-Configured:**
125125
```yaml
126-
- uses: SocketDev/socket-basics@1.0.26
126+
- uses: SocketDev/socket-basics@1.0.28
127127
env:
128128
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
129129
with:
@@ -139,10 +139,10 @@ Configure scanning policies, notification channels, and rule sets for your entir
139139

140140
```bash
141141
# Build with version tag
142-
docker build -t socketdev/socket-basics:1.0.26 .
142+
docker build -t socketdev/socket-basics:1.0.28 .
143143
144144
# Run scan
145-
docker run --rm -v "$PWD:/workspace" socketdev/socket-basics:1.0.26 \
145+
docker run --rm -v "$PWD:/workspace" socketdev/socket-basics:1.0.28 \
146146
--workspace /workspace \
147147
--python-sast-enabled \
148148
--secret-scanning-enabled \

docs/github-action.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4040

4141
- name: Run Socket Basics
42-
uses: SocketDev/socket-basics@1.0.26
42+
uses: SocketDev/socket-basics@1.0.28
4343
env:
4444
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
4545
with:
@@ -79,7 +79,7 @@ Include these in your workflow's `jobs.<job_id>.permissions` section.
7979

8080
**SAST (Static Analysis):**
8181
```yaml
82-
- uses: SocketDev/socket-basics@1.0.26
82+
- uses: SocketDev/socket-basics@1.0.28
8383
with:
8484
github_token: ${{ secrets.GITHUB_TOKEN }}
8585
# Enable SAST for specific languages
@@ -93,7 +93,7 @@ Include these in your workflow's `jobs.<job_id>.permissions` section.
9393

9494
**Secret Scanning:**
9595
```yaml
96-
- uses: SocketDev/socket-basics@1.0.26
96+
- uses: SocketDev/socket-basics@1.0.28
9797
with:
9898
github_token: ${{ secrets.GITHUB_TOKEN }}
9999
secret_scanning_enabled: 'true'
@@ -105,7 +105,7 @@ Include these in your workflow's `jobs.<job_id>.permissions` section.
105105

106106
**Container Scanning:**
107107
```yaml
108-
- uses: SocketDev/socket-basics@1.0.26
108+
- uses: SocketDev/socket-basics@1.0.28
109109
with:
110110
github_token: ${{ secrets.GITHUB_TOKEN }}
111111
# Scan Docker images (auto-enables container scanning)
@@ -116,7 +116,7 @@ Include these in your workflow's `jobs.<job_id>.permissions` section.
116116

117117
**Socket Tier 1 Reachability:**
118118
```yaml
119-
- uses: SocketDev/socket-basics@1.0.26
119+
- uses: SocketDev/socket-basics@1.0.28
120120
with:
121121
github_token: ${{ secrets.GITHUB_TOKEN }}
122122
socket_tier_1_enabled: 'true'
@@ -125,7 +125,7 @@ Include these in your workflow's `jobs.<job_id>.permissions` section.
125125
### Output Configuration
126126

127127
```yaml
128-
- uses: SocketDev/socket-basics@1.0.26
128+
- uses: SocketDev/socket-basics@1.0.28
129129
with:
130130
github_token: ${{ secrets.GITHUB_TOKEN }}
131131
python_sast_enabled: 'true'
@@ -155,7 +155,7 @@ Configure Socket Basics centrally from the [Socket Dashboard](https://socket.dev
155155

156156
**Enable in workflow:**
157157
```yaml
158-
- uses: SocketDev/socket-basics@1.0.26
158+
- uses: SocketDev/socket-basics@1.0.28
159159
env:
160160
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
161161
with:
@@ -167,7 +167,7 @@ Configure Socket Basics centrally from the [Socket Dashboard](https://socket.dev
167167

168168
> **Note:** You can also pass credentials using environment variables instead of the `with:` section:
169169
> ```yaml
170-
> - uses: SocketDev/socket-basics@1.0.26
170+
> - uses: SocketDev/socket-basics@1.0.28
171171
> env:
172172
> SOCKET_SECURITY_API_KEY: ${{ secrets.SOCKET_SECURITY_API_KEY }}
173173
> with:
@@ -185,7 +185,7 @@ All notification integrations require Socket Enterprise.
185185

186186
**Slack Notifications:**
187187
```yaml
188-
- uses: SocketDev/socket-basics@1.0.26
188+
- uses: SocketDev/socket-basics@1.0.28
189189
with:
190190
github_token: ${{ secrets.GITHUB_TOKEN }}
191191
socket_org: ${{ secrets.SOCKET_ORG }}
@@ -197,7 +197,7 @@ All notification integrations require Socket Enterprise.
197197

198198
**Jira Issue Creation:**
199199
```yaml
200-
- uses: SocketDev/socket-basics@1.0.26
200+
- uses: SocketDev/socket-basics@1.0.28
201201
with:
202202
github_token: ${{ secrets.GITHUB_TOKEN }}
203203
socket_org: ${{ secrets.SOCKET_ORG }}
@@ -212,7 +212,7 @@ All notification integrations require Socket Enterprise.
212212

213213
**Microsoft Teams:**
214214
```yaml
215-
- uses: SocketDev/socket-basics@1.0.26
215+
- uses: SocketDev/socket-basics@1.0.28
216216
with:
217217
github_token: ${{ secrets.GITHUB_TOKEN }}
218218
socket_org: ${{ secrets.SOCKET_ORG }}
@@ -224,7 +224,7 @@ All notification integrations require Socket Enterprise.
224224

225225
**Generic Webhook:**
226226
```yaml
227-
- uses: SocketDev/socket-basics@1.0.26
227+
- uses: SocketDev/socket-basics@1.0.28
228228
with:
229229
github_token: ${{ secrets.GITHUB_TOKEN }}
230230
socket_org: ${{ secrets.SOCKET_ORG }}
@@ -236,7 +236,7 @@ All notification integrations require Socket Enterprise.
236236

237237
**SIEM Integration:**
238238
```yaml
239-
- uses: SocketDev/socket-basics@1.0.26
239+
- uses: SocketDev/socket-basics@1.0.28
240240
with:
241241
github_token: ${{ secrets.GITHUB_TOKEN }}
242242
socket_org: ${{ secrets.SOCKET_ORG }}
@@ -272,7 +272,7 @@ jobs:
272272
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
273273
274274
- name: Run Socket Basics
275-
uses: SocketDev/socket-basics@1.0.26
275+
uses: SocketDev/socket-basics@1.0.28
276276
env:
277277
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
278278
with:
@@ -318,7 +318,7 @@ jobs:
318318
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
319319
320320
- name: Run Full Security Scan
321-
uses: SocketDev/socket-basics@1.0.26
321+
uses: SocketDev/socket-basics@1.0.28
322322
env:
323323
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
324324
with:
@@ -369,10 +369,10 @@ jobs:
369369
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
370370
371371
- name: Build Docker Image
372-
run: docker build -t myapp:1.0.26:${{ github.sha }} .
372+
run: docker build -t myapp:1.0.28:${{ github.sha }} .
373373
374374
- name: Scan Container
375-
uses: SocketDev/socket-basics@1.0.26
375+
uses: SocketDev/socket-basics@1.0.28
376376
env:
377377
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
378378
with:
@@ -435,7 +435,7 @@ jobs:
435435
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
436436
437437
- name: Run Socket Basics
438-
uses: SocketDev/socket-basics@1.0.26
438+
uses: SocketDev/socket-basics@1.0.28
439439
env:
440440
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
441441
with:
@@ -487,7 +487,7 @@ jobs:
487487
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
488488
489489
- name: Run Socket Basics
490-
uses: SocketDev/socket-basics@1.0.26
490+
uses: SocketDev/socket-basics@1.0.28
491491
env:
492492
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
493493
with:
@@ -580,7 +580,7 @@ env:
580580
```yaml
581581
steps:
582582
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - Must be first
583-
- uses: SocketDev/socket-basics@1.0.26
583+
- uses: SocketDev/socket-basics@1.0.28
584584
```
585585

586586
### PR Comments Not Appearing

0 commit comments

Comments
 (0)