Skip to content

Commit 27d84d5

Browse files
committed
Merge remote-tracking branch 'origin/main' into barslev/streaming-logs
# Conflicts: # CHANGELOG.md # pyproject.toml # socketsecurity/__init__.py # socketsecurity/socketcli.py
2 parents 19216ce + f5ae591 commit 27d84d5

48 files changed

Lines changed: 6799 additions & 537 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: "Set up Docker"
2+
description: >-
3+
Set up QEMU + Docker Buildx and authenticate to Docker Hub for multi-arch
4+
image builds. Centralizes the QEMU/Buildx/login trio used by release,
5+
preview, and stable workflows.
6+
7+
inputs:
8+
dockerhub-username:
9+
description: "Docker Hub username (pass from secrets)"
10+
required: true
11+
dockerhub-token:
12+
description: "Docker Hub token/password (pass from secrets)"
13+
required: true
14+
15+
runs:
16+
using: "composite"
17+
steps:
18+
- uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
19+
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
20+
- uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
21+
with:
22+
username: ${{ inputs.dockerhub-username }}
23+
password: ${{ inputs.dockerhub-token }}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: "Set up Hatch build tooling"
2+
description: >-
3+
Install the pinned hatch / hatchling / virtualenv toolchain used to build
4+
and publish the package. Assumes Python is already set up by the caller.
5+
6+
runs:
7+
using: "composite"
8+
steps:
9+
- shell: bash
10+
run: |
11+
python -m pip install --upgrade pip
12+
pip install "virtualenv<20.36"
13+
pip install hatchling==1.27.0 hatch==1.14.0
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: "Set up Socket Firewall"
2+
description: >-
3+
Set up the requested language toolchain and install Socket Firewall (free
4+
or enterprise edition) so subsequent steps can run package-manager commands
5+
wrapped with `sfw`. Defaults to free/anonymous mode (no API token -- safe on
6+
untrusted / Dependabot / fork PRs). Pass mode: firewall-enterprise +
7+
socket-token for full org-policy enforcement on trusted maintainer PRs.
8+
9+
inputs:
10+
python:
11+
description: "Set up Python 3.12"
12+
default: "false"
13+
node:
14+
description: "Set up Node 20 (needed for npm-wrapped checks)"
15+
default: "false"
16+
uv:
17+
description: "Install uv (implies Python)"
18+
default: "false"
19+
mode:
20+
description: "socketdev/action mode: firewall-free or firewall-enterprise"
21+
default: "firewall-free"
22+
socket-token:
23+
description: "Socket API token (only used/required for firewall-enterprise)"
24+
default: ""
25+
26+
runs:
27+
using: "composite"
28+
steps:
29+
- if: ${{ inputs.python == 'true' || inputs.uv == 'true' }}
30+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
31+
with:
32+
python-version: "3.12"
33+
34+
- if: ${{ inputs.node == 'true' }}
35+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
36+
with:
37+
node-version: "20"
38+
39+
# Official Socket setup action. Wires up sfw routing correctly.
40+
# socket-token is ignored in firewall-free mode and empty when absent.
41+
- uses: socketdev/action@ba6de6cc0565af1f42295590380973573297e31f # v1.3.2
42+
with:
43+
mode: ${{ inputs.mode }}
44+
socket-token: ${{ inputs.socket-token }}
45+
46+
- if: ${{ inputs.uv == 'true' }}
47+
name: Install uv
48+
shell: bash
49+
run: python -m pip install --upgrade pip uv

.github/dependabot.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Dependabot configuration for socket-python-cli.
2+
#
3+
# Design notes:
4+
# - Python deps are grouped into a weekly PR (minor/patch).
5+
# - GitHub Actions are grouped similarly into one weekly PR.
6+
# - Docker (the project Dockerfile) is tracked separately.
7+
# - 7-day cooldown enforced across all ecosystems.
8+
9+
version: 2
10+
updates:
11+
12+
# Main app Python deps (uv-tracked)
13+
- package-ecosystem: "uv"
14+
directory: "/"
15+
schedule:
16+
interval: "weekly"
17+
open-pull-requests-limit: 2
18+
groups:
19+
python-minor-patch:
20+
patterns:
21+
- "*"
22+
update-types:
23+
- "minor"
24+
- "patch"
25+
python-major:
26+
patterns:
27+
- "*"
28+
update-types:
29+
- "major"
30+
labels:
31+
- "dependencies"
32+
- "python:uv"
33+
commit-message:
34+
prefix: "chore"
35+
include: "scope"
36+
cooldown:
37+
default-days: 7
38+
39+
# GitHub Actions used in workflows and local composite actions.
40+
- package-ecosystem: "github-actions"
41+
directories:
42+
- "/"
43+
- "/.github/actions/*"
44+
schedule:
45+
interval: "weekly"
46+
open-pull-requests-limit: 2
47+
groups:
48+
github-actions-minor-patch:
49+
patterns:
50+
- "*"
51+
update-types:
52+
- "minor"
53+
- "patch"
54+
labels:
55+
- "dependencies"
56+
- "github-actions"
57+
commit-message:
58+
prefix: "ci"
59+
include: "scope"
60+
cooldown:
61+
default-days: 7
62+
63+
# Project Dockerfile base images and pinned binaries
64+
- package-ecosystem: "docker"
65+
directory: "/"
66+
schedule:
67+
interval: "weekly"
68+
open-pull-requests-limit: 2
69+
labels:
70+
- "dependencies"
71+
- "docker"
72+
commit-message:
73+
prefix: "chore"
74+
include: "scope"
75+
cooldown:
76+
default-days: 7

0 commit comments

Comments
 (0)