Skip to content

Commit 5e4eaa6

Browse files
committed
Resolve merge conflicts
Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
2 parents 2cc4bdd + 064fb7d commit 5e4eaa6

File tree

12 files changed

+103
-139
lines changed

12 files changed

+103
-139
lines changed

.github/workflows/docker-stable.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,46 @@ on:
66
description: 'Version to mark as stable (e.g., 1.2.3)'
77
required: true
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
stable:
1114
runs-on: ubuntu-latest
1215
steps:
13-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
17+
with:
18+
persist-credentials: false
1419

1520
- name: Check if version exists in PyPI
1621
id: version_check
22+
env:
23+
INPUT_VERSION: ${{ inputs.version }}
1724
run: |
18-
if ! curl -s -f https://pypi.org/pypi/socketsecurity/${{ inputs.version }}/json > /dev/null; then
19-
echo "Error: Version ${{ inputs.version }} not found on PyPI"
25+
if ! curl -s -f "https://pypi.org/pypi/socketsecurity/${INPUT_VERSION}/json" > /dev/null; then
26+
echo "Error: Version ${INPUT_VERSION} not found on PyPI"
2027
exit 1
2128
fi
22-
echo "Version ${{ inputs.version }} found on PyPI - proceeding with release"
29+
echo "Version ${INPUT_VERSION} found on PyPI - proceeding with release"
2330
2431
- name: Set up QEMU
25-
uses: docker/setup-qemu-action@v3
32+
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
2633

2734
- name: Set up Docker Buildx
28-
uses: docker/setup-buildx-action@v3
35+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
2936

3037
- name: Login to Docker Hub with Organization Token
31-
uses: docker/login-action@v3
38+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
3239
with:
3340
username: ${{ secrets.DOCKERHUB_USERNAME }}
3441
password: ${{ secrets.DOCKERHUB_TOKEN }}
3542

3643
- name: Build & Push Stable Docker
37-
uses: docker/build-push-action@v5
44+
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
3845
with:
3946
push: true
4047
platforms: linux/amd64,linux/arm64
4148
tags: socketdev/cli:stable
4249
build-args: |
4350
CLI_VERSION=${{ inputs.version }}
44-
51+

.github/workflows/e2e-test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,20 @@ on:
44
push:
55
branches: [main]
66
pull_request:
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
711

812
jobs:
913
e2e-scan:
14+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
1015
runs-on: ubuntu-latest
1116
steps:
1217
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
1318
with:
1419
fetch-depth: 0
20+
persist-credentials: false
1521

1622
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
1723
with:
@@ -48,11 +54,13 @@ jobs:
4854
fi
4955
5056
e2e-sarif:
57+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
5158
runs-on: ubuntu-latest
5259
steps:
5360
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
5461
with:
5562
fetch-depth: 0
63+
persist-credentials: false
5664

5765
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
5866
with:
@@ -87,11 +95,13 @@ jobs:
8795
"
8896
8997
e2e-reachability:
98+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
9099
runs-on: ubuntu-latest
91100
steps:
92101
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
93102
with:
94103
fetch-depth: 0
104+
persist-credentials: false
95105

96106
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
97107
with:

.github/workflows/pr-preview.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55

66
jobs:
77
preview:
8+
if: github.event.pull_request.head.repo.full_name == github.repository
89
runs-on: ubuntu-latest
910
permissions:
1011
id-token: write
@@ -14,6 +15,7 @@ jobs:
1415
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
1516
with:
1617
fetch-depth: 0
18+
persist-credentials: false
1719
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
1820
with:
1921
python-version: '3.13'

.github/workflows/python-tests.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,23 @@ jobs:
5050
uv sync --extra test
5151
- name: 🧪 run tests
5252
run: uv run pytest -q tests/unit/ tests/core/
53+
54+
unsupported-python-install:
55+
runs-on: ubuntu-latest
56+
timeout-minutes: 10
57+
steps:
58+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
59+
with:
60+
fetch-depth: 1
61+
persist-credentials: false
62+
- name: 🐍 setup python
63+
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
64+
with:
65+
python-version: "3.10"
66+
- name: 🚫 verify install is rejected on unsupported python
67+
run: |
68+
python -m pip install --upgrade pip
69+
if pip install .; then
70+
echo "Expected pip install . to fail on Python 3.10"
71+
exit 1
72+
fi

.github/workflows/release.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
1414
with:
1515
fetch-depth: 0
16+
persist-credentials: false
1617
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
1718
with:
1819
python-version: '3.13'
@@ -26,11 +27,13 @@ jobs:
2627
2728
- name: Get Version
2829
id: version
30+
env:
31+
REF_NAME: ${{ github.ref_name }}
2932
run: |
3033
RAW_VERSION=$(hatch version)
3134
echo "VERSION=$RAW_VERSION" >> $GITHUB_ENV
32-
if [ "v$RAW_VERSION" != "${{ github.ref_name }}" ]; then
33-
echo "Error: Git tag (${{ github.ref_name }}) does not match hatch version (v$RAW_VERSION)"
35+
if [ "v$RAW_VERSION" != "$REF_NAME" ]; then
36+
echo "Error: Git tag ($REF_NAME) does not match hatch version (v$RAW_VERSION)"
3437
exit 1
3538
fi
3639
@@ -52,7 +55,7 @@ jobs:
5255
env:
5356
VERSION: ${{ env.VERSION }}
5457
run: |
55-
if curl -s -f "https://hub.docker.com/v2/repositories/socketdev/cli/tags/${{ env.VERSION }}" > /dev/null; then
58+
if curl -s -f "https://hub.docker.com/v2/repositories/socketdev/cli/tags/${VERSION}" > /dev/null; then
5659
echo "Docker image socketdev/cli:${VERSION} already exists"
5760
echo "docker_exists=true" >> $GITHUB_OUTPUT
5861
else
@@ -113,4 +116,4 @@ jobs:
113116
socketdev/cli:latest
114117
socketdev/cli:${{ env.VERSION }}
115118
build-args: |
116-
CLI_VERSION=${{ env.VERSION }}
119+
CLI_VERSION=${{ env.VERSION }}

.github/workflows/version-check.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ on:
77
- 'setup.py'
88
- 'pyproject.toml'
99

10+
permissions:
11+
contents: read
12+
pull-requests: write
13+
issues: write
14+
1015
jobs:
1116
check_version:
1217
runs-on: ubuntu-latest
1318
steps:
1419
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
1520
with:
1621
fetch-depth: 0 # Fetch all history for all branches
22+
persist-credentials: false
1723

1824
- name: Check version increment
1925
id: version_check
@@ -42,7 +48,7 @@ jobs:
4248
4349
- name: Manage PR Comment
4450
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
45-
if: always()
51+
if: always() && github.event.pull_request.head.repo.full_name == github.repository
4652
env:
4753
MAIN_VERSION: ${{ env.MAIN_VERSION }}
4854
PR_VERSION: ${{ env.PR_VERSION }}

.github/zizmor.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
rules:
2+
secrets-outside-env:
3+
disable: true

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Socket Python CLI for Socket scans, diff reporting, reachability analysis, and SARIF/GitLab exports.
44

5-
Comprehensive docs are available in [`docs/`](docs/) for full flag reference, CI/CD-specific guidance, and contributor setup.
5+
Comprehensive docs are available in [`docs/`](https://github.com/SocketDev/socket-python-cli/tree/main/docs) for full flag reference, CI/CD-specific guidance, and contributor setup.
66

77
## Quick start
88

@@ -27,8 +27,8 @@ socketcli --target-path .
2727
## Common use cases
2828

2929
This section covers the paved path/common workflows.
30-
For advanced options and exhaustive details, see [`docs/cli-reference.md`](docs/cli-reference.md).
31-
For CI/CD-specific guidance, see [`docs/ci-cd.md`](docs/ci-cd.md).
30+
For advanced options and exhaustive details, see [`docs/cli-reference.md`](https://github.com/SocketDev/socket-python-cli/blob/main/docs/cli-reference.md).
31+
For CI/CD-specific guidance, see [`docs/ci-cd.md`](https://github.com/SocketDev/socket-python-cli/blob/main/docs/ci-cd.md).
3232

3333
### Basic policy scan (no SARIF)
3434

@@ -91,7 +91,7 @@ socketcli \
9191
Dashboard parity note:
9292
- Full-scope SARIF is the closest match for dashboard-style filtering.
9393
- Exact result counts can still differ from the dashboard due to backend/API consolidation differences and grouping semantics.
94-
- See [`docs/troubleshooting.md#dashboard-vs-cli-result-counts`](docs/troubleshooting.md#dashboard-vs-cli-result-counts).
94+
- See [`docs/troubleshooting.md#dashboard-vs-cli-result-counts`](https://github.com/SocketDev/socket-python-cli/blob/main/docs/troubleshooting.md#dashboard-vs-cli-result-counts).
9595

9696
## Config files (`--config`)
9797

@@ -137,23 +137,23 @@ socketcli --config .socketcli.toml --target-path .
137137
Reference sample configs:
138138

139139
TOML:
140-
- [`examples/config/sarif-dashboard-parity.toml`](examples/config/sarif-dashboard-parity.toml)
141-
- [`examples/config/sarif-instance-detail.toml`](examples/config/sarif-instance-detail.toml)
142-
- [`examples/config/sarif-diff-ci-cd.toml`](examples/config/sarif-diff-ci-cd.toml)
140+
- [`examples/config/sarif-dashboard-parity.toml`](https://github.com/SocketDev/socket-python-cli/blob/main/examples/config/sarif-dashboard-parity.toml)
141+
- [`examples/config/sarif-instance-detail.toml`](https://github.com/SocketDev/socket-python-cli/blob/main/examples/config/sarif-instance-detail.toml)
142+
- [`examples/config/sarif-diff-ci-cd.toml`](https://github.com/SocketDev/socket-python-cli/blob/main/examples/config/sarif-diff-ci-cd.toml)
143143

144144
JSON:
145-
- [`examples/config/sarif-dashboard-parity.json`](examples/config/sarif-dashboard-parity.json)
146-
- [`examples/config/sarif-instance-detail.json`](examples/config/sarif-instance-detail.json)
147-
- [`examples/config/sarif-diff-ci-cd.json`](examples/config/sarif-diff-ci-cd.json)
145+
- [`examples/config/sarif-dashboard-parity.json`](https://github.com/SocketDev/socket-python-cli/blob/main/examples/config/sarif-dashboard-parity.json)
146+
- [`examples/config/sarif-instance-detail.json`](https://github.com/SocketDev/socket-python-cli/blob/main/examples/config/sarif-instance-detail.json)
147+
- [`examples/config/sarif-diff-ci-cd.json`](https://github.com/SocketDev/socket-python-cli/blob/main/examples/config/sarif-diff-ci-cd.json)
148148

149149
## CI/CD examples
150150

151151
Prebuilt workflow examples:
152152

153-
- [GitHub Actions](workflows/github-actions.yml)
154-
- [Buildkite](workflows/buildkite.yml)
155-
- [GitLab CI](workflows/gitlab-ci.yml)
156-
- [Bitbucket Pipelines](workflows/bitbucket-pipelines.yml)
153+
- [GitHub Actions](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/github-actions.yml)
154+
- [Buildkite](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/buildkite.yml)
155+
- [GitLab CI](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/gitlab-ci.yml)
156+
- [Bitbucket Pipelines](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/bitbucket-pipelines.yml)
157157

158158
Minimal pattern:
159159

@@ -166,7 +166,7 @@ Minimal pattern:
166166
167167
## Common gotchas
168168
169-
See [`docs/troubleshooting.md`](docs/troubleshooting.md#common-gotchas).
169+
See [`docs/troubleshooting.md`](https://github.com/SocketDev/socket-python-cli/blob/main/docs/troubleshooting.md#common-gotchas).
170170

171171
## Quick verification checks
172172

@@ -187,7 +187,7 @@ jq '.runs[0].results | length' sarif-diff-reachable.sarif
187187

188188
## Documentation reference
189189

190-
- Full CLI reference: [`docs/cli-reference.md`](docs/cli-reference.md)
191-
- CI/CD guide: [`docs/ci-cd.md`](docs/ci-cd.md)
192-
- Troubleshooting guide: [`docs/troubleshooting.md`](docs/troubleshooting.md)
193-
- Development guide: [`docs/development.md`](docs/development.md)
190+
- Full CLI reference: [`docs/cli-reference.md`](https://github.com/SocketDev/socket-python-cli/blob/main/docs/cli-reference.md)
191+
- CI/CD guide: [`docs/ci-cd.md`](https://github.com/SocketDev/socket-python-cli/blob/main/docs/ci-cd.md)
192+
- Troubleshooting guide: [`docs/troubleshooting.md`](https://github.com/SocketDev/socket-python-cli/blob/main/docs/troubleshooting.md)
193+
- Development guide: [`docs/development.md`](https://github.com/SocketDev/socket-python-cli/blob/main/docs/development.md)

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ build-backend = "hatchling.build"
66

77
[project]
88
name = "socketsecurity"
9-
version = "2.2.79"
10-
requires-python = ">= 3.10"
9+
version = "2.2.80"
10+
requires-python = ">= 3.11"
1111
license = {"file" = "LICENSE"}
1212
dependencies = [
1313
'requests',
@@ -166,4 +166,3 @@ include = ["socketsecurity", "LICENSE"]
166166
dev = [
167167
"pre-commit>=4.3.0",
168168
]
169-

socketsecurity/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
__author__ = 'socket.dev'
2-
__version__ = '2.2.79'
2+
__version__ = '2.2.80'
33
USER_AGENT = f'SocketPythonCLI/{__version__}'

0 commit comments

Comments
 (0)