Skip to content

Commit eb66288

Browse files
committed
Fix all security issues found with zizmor
1 parent 6881c98 commit eb66288

7 files changed

Lines changed: 46 additions & 22 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: 16 additions & 5 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
@@ -26,15 +33,17 @@ jobs:
2633
deps-group: release
2734
- name: Set pre-release version
2835
if: startsWith(github.ref, 'refs/tags/') != true
36+
env:
37+
RUN_NUMBER: ${{ github.run_number }}
2938
run: |
3039
VERSION_BASE="$(uv version --short)"
31-
RUN_NUMBER="${{ github.run_number }}"
3240
uv version "${VERSION_BASE}.dev${RUN_NUMBER}"
3341
- name: Set release version
3442
if: startsWith(github.ref, 'refs/tags/') == true
43+
env:
44+
VERSION_TAG: ${{ github.event.release.tag_name }}
3545
run: |
36-
VERSION_TAG="${{ github.event.release.tag_name }}"
37-
[[ $VERSION_TAG != $(uv version --short) ]] && {
46+
[[ ${VERSION_TAG} != $(uv version --short) ]] && {
3847
printf "Git tag should be identical to version field in pyproject.toml"
3948
exit 1
4049
}
@@ -60,11 +69,12 @@ jobs:
6069
path: docs/_build/html
6170

6271
publish-pre-release:
72+
name: Publish pre-release to Test PyPI
6373
if: startsWith(github.ref, 'refs/tags/') == false
6474
needs: build-distributables
6575
runs-on: ubuntu-latest
6676
permissions:
67-
id-token: write
77+
id-token: write # Required for OIDC-based trusted publishing to PyPI
6878
environment:
6979
name: splunk-test-pypi
7080
url: https://test.pypi.org/project/splunk-sdk/
@@ -80,11 +90,12 @@ jobs:
8090
repository-url: https://test.pypi.org/legacy/
8191

8292
publish-release:
93+
name: Publish release to PyPI
8394
if: startsWith(github.ref, 'refs/tags/') == true
8495
needs: build-distributables
8596
runs-on: ubuntu-latest
8697
permissions:
87-
id-token: write
98+
id-token: write # Required for OIDC-based trusted publishing to PyPI
8899
environment:
89100
name: splunk-pypi
90101
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)