Skip to content

Commit 125c584

Browse files
committed
Fix all security issues found with zizmor
1 parent ce0c7c1 commit 125c584

7 files changed

Lines changed: 43 additions & 20 deletions

File tree

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
name: Run Splunk AppInspect
22
description: Package a mock app containing the SDK and its dependencies, then validate it with AppInspect.
33

4-
inputs:
5-
mock-app-path:
6-
description: Path to app packaged for scanning with AppInspect
7-
required: true
8-
default: ./tests/system/test_apps/generating_app
9-
104
runs:
115
using: composite
126
steps:
@@ -16,13 +10,13 @@ runs:
1610
- name: Install the SDK and its dependencies into the mock app
1711
shell: bash
1812
run: |
19-
mkdir -p ${{ inputs.mock-app-path }}/bin/lib
20-
uv pip install ".[openai, anthropic, google]" --target ${{ inputs.mock-app-path }}/bin/lib
13+
mkdir -p ./tests/system/test_apps/generating_app/bin/lib
14+
uv pip install ".[openai, anthropic, google]" --target ./tests/system/test_apps/generating_app/bin/lib
2115
- name: Package the mock app
2216
shell: bash
2317
run: |
24-
cd ${{ inputs.mock-app-path }}
18+
cd ./tests/system/test_apps/generating_app
2519
tar -czf mock_app.tgz --exclude="__pycache__" bin default metadata
2620
- name: Validate the mock app with AppInspect
2721
shell: bash
28-
run: uvx splunk-appinspect inspect ${{ inputs.mock-app-path }}/mock_app.tgz --included-tags cloud
22+
run: uvx splunk-appinspect inspect ./tests/system/test_apps/generating_app/mock_app.tgz --included-tags cloud

‎.github/actions/setup-sdk-environment/action.yml‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ name: Set up SDK environment
22
description: Perform all the shared setup steps
33

44
inputs:
5-
python-version:
6-
description: Python version used for this run
7-
required: true
8-
default: "3.13"
95
deps-group:
106
description: Dependency groups passed to `uv sync --group`
117
required: true
@@ -17,12 +13,12 @@ runs:
1713
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57
1814
with:
1915
version: 0.11.6
20-
python-version: ${{ inputs.python-version }}
16+
python-version: 3.13
2117
activate-environment: true
2218
enable-cache: true
2319
cache-python: true
2420
- name: Install dependencies from the ${{ inputs.deps-group }} group
2521
env:
2622
SDK_DEPS_GROUP: ${{ inputs.deps-group }}
2723
shell: bash
28-
run: SDK_DEPS_GROUP="${{ inputs.deps-group }}" make ci-install
24+
run: make ci-install

‎.github/dependabot.yaml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ updates:
88
groups:
99
github-actions:
1010
patterns: ["*"]
11+
cooldown:
12+
default-days: 7
1113
- package-ecosystem: "uv"
1214
directory: "/"
1315
schedule:
1416
interval: "weekly"
1517
groups:
1618
python-uv-lock:
1719
patterns: ["*"]
20+
cooldown:
21+
default-days: 7

‎.github/workflows/appinspect.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
name: Validate SDK with Splunk AppInspect
22
on: [push, workflow_dispatch]
33

4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
6+
cancel-in-progress: true
7+
8+
permissions: {}
9+
410
env:
511
PYTHON_VERSION: 3.13
612

713
jobs:
814
appinspect:
15+
name: AppInspect
916
runs-on: ubuntu-latest
1017
steps:
1118
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd

‎.github/workflows/cd.yml‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@ on:
66
types: [published]
77
workflow_dispatch:
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: false
12+
13+
permissions: {}
14+
915
env:
1016
DIST_DIR: dist/
1117

1218
jobs:
1319
build-distributables:
20+
name: Build distributables
1421
# Why building is separate from publishing:
1522
# https://github.com/pypa/gh-action-pypi-publish/issues/217#issuecomment-1965727093
1623
runs-on: ubuntu-latest
@@ -27,9 +34,10 @@ jobs:
2734
- name: Set pre-release version
2835
id: set-version
2936
if: startsWith(github.ref, 'refs/tags/') != true
37+
env:
38+
RUN_NUMBER: ${{ github.run_number }}
3039
run: |
3140
VERSION_BASE="$(uv version --short)"
32-
RUN_NUMBER="${{ github.run_number }}"
3341
uv version --frozen "${VERSION_BASE}.dev${RUN_NUMBER}"
3442
- name: Get current version
3543
id: get-version
@@ -52,11 +60,12 @@ jobs:
5260
path: docs/_build/html
5361

5462
publish-pre-release:
63+
name: Publish pre-release to Test PyPI
5564
if: startsWith(github.ref, 'refs/tags/') == false
5665
needs: build-distributables
5766
runs-on: ubuntu-latest
5867
permissions:
59-
id-token: write
68+
id-token: write # Required for OIDC-based trusted publishing to PyPI
6069
environment:
6170
name: splunk-test-pypi
6271
url: https://test.pypi.org/project/splunk-sdk/
@@ -72,11 +81,12 @@ jobs:
7281
repository-url: https://test.pypi.org/legacy/
7382

7483
publish-release:
84+
name: Publish release to PyPI
7585
if: startsWith(github.ref, 'refs/tags/') == true
7686
needs: build-distributables
7787
runs-on: ubuntu-latest
7888
permissions:
79-
id-token: write
89+
id-token: write # Required for OIDC-based trusted publishing to PyPI
8090
environment:
8191
name: splunk-pypi
8292
url: https://pypi.org/project/splunk-sdk/

‎.github/workflows/lint.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
name: Python SDK Lint
22
on: [push, workflow_dispatch]
33

4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
6+
cancel-in-progress: true
7+
8+
permissions: {}
9+
410
jobs:
511
lint:
12+
name: Lint
613
runs-on: ubuntu-latest
714
steps:
815
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd

‎.github/workflows/test.yml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ concurrency:
55
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
66
cancel-in-progress: true
77

8+
permissions: {}
9+
810
jobs:
911
test:
12+
name: Test
1013
runs-on: ubuntu-latest
1114
strategy:
1215
matrix:
@@ -26,7 +29,9 @@ jobs:
2629
SPLUNKBASE_PASSWORD: ${{ secrets.SPLUNKBASE_PASSWORD }}
2730
run: uv run ./scripts/download_splunk_mcp_server_app.py
2831
- name: Launch Splunk Docker instance
29-
run: SPLUNK_VERSION=${{ matrix.splunk-version }} docker compose up -d
32+
env:
33+
SPLUNK_VERSION: ${{ matrix.splunk-version }}
34+
run: docker compose up -d
3035
- name: Set up .env
3136
run: cp .env.template .env
3237
- name: Write internal AI secrets to .env

0 commit comments

Comments
 (0)