-
Notifications
You must be signed in to change notification settings - Fork 44
develop β main
#1342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
develop β main
#1342
Changes from 26 commits
b8d3d9c
c45607a
dce40b9
64e1172
2f1397b
fd6e194
91d14d8
6141fb2
d0a5457
4e5dcc3
2c87117
645a96f
ec5deb2
bb26e4d
6ce4b3a
b2016a5
2a93dae
5d87aef
a8ab034
64bdfd7
3e70319
9c0258b
b463192
92ffff5
ab9219f
139e5a8
325e938
07ff1e2
2fa41e0
aef16a8
b10877f
056eb21
0c6f67a
70cc2bc
55efca5
4e06ae9
c590523
abb4cf3
4115f4f
b8fafca
3558c34
e23c705
f35d647
88b2e28
888713f
16e0f45
8d907ef
724c1c7
eac404d
c4f253f
5b95fa0
c0ed827
8430f96
a026c63
2afbf70
6bb9438
a9b3097
4aa5757
a4689f7
386e6d8
ace4fba
ee34c27
0437144
43fea28
fb99904
40cfc44
8a85e55
6a4c57b
c7a8b1f
802a775
7f453d8
f39e443
fd6ed41
a5b188b
7240fd8
5f3c52a
ed2b19e
a996682
11ff1b9
b628452
6761513
27d8a98
8decac7
10af4c1
7e29103
254fc7a
ead97be
c2bceca
922b58d
ac7a770
fcd662a
4c85e9f
79e7520
2a4809d
5cb3c2e
2ed7cec
7f2d43b
2c47a18
e659879
7736e44
68b9508
f4d62be
7efc07a
80c206d
a0a787c
261184a
6ba249a
8a8faae
ef5c430
d0fdc09
fda69c8
bf25f76
cc5407f
cbca288
8679587
5b6a6b5
3bb283d
ec3930c
6be8822
d2ac937
6955025
cd83e67
9644ccd
ae40325
791cd1b
8d4544d
d2de2c8
1c9c157
2c6dbf1
21bab32
548db4d
ca6797c
7e5d54d
054fbd3
0dc81f0
1fadc3d
eab5842
8dc209f
104b56d
fe36609
b2cae45
3ffaaf4
148ad78
92edb9e
dc02e7b
0b5bd70
01796d6
597c86f
9665964
2341f5e
317bc7c
39b024b
60a91c9
0e729ba
b663ea7
bf7c0d1
818a6a5
5adeac1
0db42a3
233dff1
3855fca
89fff2c
3e87a17
4fa2f27
e68020f
7f5a7e5
6edd64e
b09cf3f
0619e46
386a7c1
1b84a76
1717d43
e84f99f
f967150
2021d2e
2bc183b
f29adea
6f07339
4a96b7a
10bde50
a7fc01a
2bc8c53
775c24f
6946c9c
99b4bf6
5a567a2
206f414
957d200
ec64e00
5121290
1bddd1a
b427ea1
63759f5
25c3399
e909ade
cba1e80
187e765
ec130c7
4cddbed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,219 @@ | ||||||||||||||||||||||||||||||||
| name: Integration Tests | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||
| branches: | ||||||||||||||||||||||||||||||||
| - main | ||||||||||||||||||||||||||||||||
| - master | ||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||
| branches: | ||||||||||||||||||||||||||||||||
| - main | ||||||||||||||||||||||||||||||||
| - master | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| concurrency: | ||||||||||||||||||||||||||||||||
| group: ${{ github.workflow }}-${{ github.ref }} | ||||||||||||||||||||||||||||||||
| cancel-in-progress: true | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||
| build: | ||||||||||||||||||||||||||||||||
| uses: ./.github/workflows/build.yaml | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| integration-test: | ||||||||||||||||||||||||||||||||
| needs: build | ||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||
| - name: Check out code | ||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Download Funnel binary | ||||||||||||||||||||||||||||||||
| uses: actions/download-artifact@v4 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| name: funnel | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Set up Helm | ||||||||||||||||||||||||||||||||
| uses: azure/setup-helm@v4 | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| version: latest | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Create Kind cluster | ||||||||||||||||||||||||||||||||
| uses: helm/kind-action@v1 | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| cluster_name: funnel-test | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Setup kubectl | ||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||
| # Verify cluster is accessible | ||||||||||||||||||||||||||||||||
| kubectl cluster-info | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Setup storage for MinIO | ||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||
| # Create a local-path storage class for Kind | ||||||||||||||||||||||||||||||||
| kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| # Set local-path as default StorageClass | ||||||||||||||||||||||||||||||||
| kubectl patch storageclass standard -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}' | ||||||||||||||||||||||||||||||||
| kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}' | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Setup MinIO | ||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||
| kubectl create namespace storage | ||||||||||||||||||||||||||||||||
| kubectl apply -f - <<EOF | ||||||||||||||||||||||||||||||||
| apiVersion: v1 | ||||||||||||||||||||||||||||||||
| kind: PersistentVolumeClaim | ||||||||||||||||||||||||||||||||
| metadata: | ||||||||||||||||||||||||||||||||
| name: minio-pvc | ||||||||||||||||||||||||||||||||
| namespace: storage | ||||||||||||||||||||||||||||||||
| spec: | ||||||||||||||||||||||||||||||||
| accessModes: | ||||||||||||||||||||||||||||||||
| - ReadWriteOnce | ||||||||||||||||||||||||||||||||
| resources: | ||||||||||||||||||||||||||||||||
| requests: | ||||||||||||||||||||||||||||||||
| storage: 1Gi | ||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||
| apiVersion: apps/v1 | ||||||||||||||||||||||||||||||||
| kind: Deployment | ||||||||||||||||||||||||||||||||
| metadata: | ||||||||||||||||||||||||||||||||
| name: minio | ||||||||||||||||||||||||||||||||
| namespace: storage | ||||||||||||||||||||||||||||||||
| spec: | ||||||||||||||||||||||||||||||||
| replicas: 1 | ||||||||||||||||||||||||||||||||
| selector: | ||||||||||||||||||||||||||||||||
| matchLabels: | ||||||||||||||||||||||||||||||||
| app: minio | ||||||||||||||||||||||||||||||||
| template: | ||||||||||||||||||||||||||||||||
| metadata: | ||||||||||||||||||||||||||||||||
| labels: | ||||||||||||||||||||||||||||||||
| app: minio | ||||||||||||||||||||||||||||||||
| spec: | ||||||||||||||||||||||||||||||||
| containers: | ||||||||||||||||||||||||||||||||
| - name: minio | ||||||||||||||||||||||||||||||||
| image: minio/minio:latest | ||||||||||||||||||||||||||||||||
| args: | ||||||||||||||||||||||||||||||||
| - server | ||||||||||||||||||||||||||||||||
| - /data | ||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||
| - name: MINIO_ROOT_USER | ||||||||||||||||||||||||||||||||
| value: "minioadmin" | ||||||||||||||||||||||||||||||||
| - name: MINIO_ROOT_PASSWORD | ||||||||||||||||||||||||||||||||
| value: "minioadmin" | ||||||||||||||||||||||||||||||||
| ports: | ||||||||||||||||||||||||||||||||
| - containerPort: 9000 | ||||||||||||||||||||||||||||||||
| name: s3 | ||||||||||||||||||||||||||||||||
| - containerPort: 9001 | ||||||||||||||||||||||||||||||||
| name: console | ||||||||||||||||||||||||||||||||
| volumeMounts: | ||||||||||||||||||||||||||||||||
| - name: data | ||||||||||||||||||||||||||||||||
| mountPath: /data | ||||||||||||||||||||||||||||||||
| livenessProbe: | ||||||||||||||||||||||||||||||||
| httpGet: | ||||||||||||||||||||||||||||||||
| path: /minio/health/live | ||||||||||||||||||||||||||||||||
| port: 9000 | ||||||||||||||||||||||||||||||||
| initialDelaySeconds: 30 | ||||||||||||||||||||||||||||||||
| periodSeconds: 10 | ||||||||||||||||||||||||||||||||
| readinessProbe: | ||||||||||||||||||||||||||||||||
| httpGet: | ||||||||||||||||||||||||||||||||
| path: /minio/health/live | ||||||||||||||||||||||||||||||||
| port: 9000 | ||||||||||||||||||||||||||||||||
| initialDelaySeconds: 30 | ||||||||||||||||||||||||||||||||
| periodSeconds: 10 | ||||||||||||||||||||||||||||||||
| volumes: | ||||||||||||||||||||||||||||||||
| - name: data | ||||||||||||||||||||||||||||||||
| persistentVolumeClaim: | ||||||||||||||||||||||||||||||||
| claimName: minio-pvc | ||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||
| apiVersion: v1 | ||||||||||||||||||||||||||||||||
| kind: Service | ||||||||||||||||||||||||||||||||
| metadata: | ||||||||||||||||||||||||||||||||
| name: minio | ||||||||||||||||||||||||||||||||
| namespace: storage | ||||||||||||||||||||||||||||||||
| spec: | ||||||||||||||||||||||||||||||||
| selector: | ||||||||||||||||||||||||||||||||
| app: minio | ||||||||||||||||||||||||||||||||
| ports: | ||||||||||||||||||||||||||||||||
| - name: s3 | ||||||||||||||||||||||||||||||||
| port: 9000 | ||||||||||||||||||||||||||||||||
| targetPort: 9000 | ||||||||||||||||||||||||||||||||
| - name: console | ||||||||||||||||||||||||||||||||
| port: 9001 | ||||||||||||||||||||||||||||||||
| targetPort: 9001 | ||||||||||||||||||||||||||||||||
| type: ClusterIP | ||||||||||||||||||||||||||||||||
| EOF | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Wait for MinIO to be ready | ||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||
| kubectl wait --for=condition=available deployment/minio --namespace=storage --timeout=120s | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Add Helm repos | ||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||
| helm repo add ohsu https://ohsu-comp-bio.github.io/helm-charts | ||||||||||||||||||||||||||||||||
| helm repo add gen3 https://helm.gen3.org | ||||||||||||||||||||||||||||||||
| helm repo update | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Create Funnel values file | ||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||
| cat <<EOF > values.yaml | ||||||||||||||||||||||||||||||||
| storage: | ||||||||||||||||||||||||||||||||
| className: local-path | ||||||||||||||||||||||||||||||||
| provisioner: driver.local.io | ||||||||||||||||||||||||||||||||
| config: | ||||||||||||||||||||||||||||||||
| # Disable other storage backends | ||||||||||||||||||||||||||||||||
| LocalStorage: | ||||||||||||||||||||||||||||||||
| Disabled: true | ||||||||||||||||||||||||||||||||
| AmazonS3: | ||||||||||||||||||||||||||||||||
| Disabled: true | ||||||||||||||||||||||||||||||||
| GoogleStorage: | ||||||||||||||||||||||||||||||||
| Disabled: true | ||||||||||||||||||||||||||||||||
| HTTPStorage: | ||||||||||||||||||||||||||||||||
| Disabled: true | ||||||||||||||||||||||||||||||||
| FTPStorage: | ||||||||||||||||||||||||||||||||
| Disabled: true | ||||||||||||||||||||||||||||||||
| # Enable GenericS3 with MinIO | ||||||||||||||||||||||||||||||||
| GenericS3: | ||||||||||||||||||||||||||||||||
| - Disabled: false | ||||||||||||||||||||||||||||||||
| Endpoint: "minio.storage.svc.cluster.local:9000" | ||||||||||||||||||||||||||||||||
| Key: "minioadmin" | ||||||||||||||||||||||||||||||||
| Secret: "minioadmin" | ||||||||||||||||||||||||||||||||
| Bucket: "funnel" | ||||||||||||||||||||||||||||||||
| Insecure: true | ||||||||||||||||||||||||||||||||
| EOF | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Install Funnel Helm Chart | ||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||
| helm upgrade --install funnel ohsu/funnel --values values.yaml --devel --wait --timeout 180s | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Wait for Funnel to be ready | ||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||
| kubectl wait --for=condition=available deployment/funnel-server --timeout=120s | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Install Gen3Workflow Helm Chart | ||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||
| helm upgrade --install gen3-workflow gen3/gen3-workflow --wait --timeout 180s | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Run integration tests | ||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||
| chmod +x funnel | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| # Port-forward Funnel service | ||||||||||||||||||||||||||||||||
| kubectl port-forward svc/funnel 8000:8000 & | ||||||||||||||||||||||||||||||||
| sleep 5 | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| # Test with hello world example | ||||||||||||||||||||||||||||||||
| funnel examples hello-world > hello-world.json | ||||||||||||||||||||||||||||||||
| ID=$(funnel task create hello-world.json) | ||||||||||||||||||||||||||||||||
| echo "Created task: $ID" | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| # Wait for task completion | ||||||||||||||||||||||||||||||||
| kubectl wait --for=condition=Complete job/$ID --timeout=120s || true | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| # Check task status | ||||||||||||||||||||||||||||||||
| funnel task get $ID | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| # Verify completion | ||||||||||||||||||||||||||||||||
| funnel task get $ID | grep -q COMPLETE | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Cleanup | ||||||||||||||||||||||||||||||||
| if: always() | ||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||
| helm uninstall funnel | ||||||||||||||||||||||||||||||||
| helm uninstall gen3-workflow | ||||||||||||||||||||||||||||||||
| kind delete cluster --name funnel-test | ||||||||||||||||||||||||||||||||
|
Comment on lines
+19
to
+216
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Copilot AutofixAI 3 months ago Add an explicit top-level
Place the block near the top-level keys (e.g., after
Suggested changeset
1
.github/workflows/integration.yaml
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
Refresh and try again.
|
||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,42 +1,48 @@ | ||
| # Publishes releases with semantic versioning | ||
| # - https://github.com/semantic-release/semantic-release/blob/master/docs/recipes/ci-configurations/github-actions.md | ||
| # - https://goreleaser.com/cookbooks/semantic-release/#example-semantic-release | ||
| # - https://semver.org | ||
| # Publishes releases to GitHub when a new semver tag is pushed | ||
| # Ref: https://semver.org | ||
|
|
||
| name: Release | ||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*.*.*' | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read # for checkout | ||
| contents: read | ||
|
|
||
| jobs: | ||
| release: | ||
| name: Release | ||
| runs-on: ubuntu-latest | ||
|
|
||
| permissions: | ||
| contents: write # to be able to publish a GitHub release | ||
| issues: write # to be able to comment on released issues | ||
| pull-requests: write # to be able to comment on released pull requests | ||
| id-token: write # to enable use of OIDC for npm provenance | ||
| contents: write | ||
| issues: write | ||
| pull-requests: write | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.ref }} | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| node-version: "lts/*" | ||
| go-version-file: 'go.mod' | ||
| cache: true | ||
|
|
||
| - name: Release | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| GORELEASER_CURRENT_TAG: ${{ github.ref_name }} | ||
| BRANCH: ${{ github.ref_name }} | ||
| run: | | ||
| npm install semantic-release/changelog semantic-release/git semantic-release/exec | ||
| npx semantic-release | ||
| export PATH="$HOME/go/bin:$PATH" | ||
| make release |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 5 months ago
In general, the fix is to explicitly define a
permissions:block in the workflow, granting only the minimal read permissions needed. Because this workflow primarily checks out code and downloads artifacts, it only needs read access to repository contents and actions-related data. We can setpermissions:at the workflow (top) level so that it applies to both thebuildworkflow call and theintegration-testjob, unless they override it.The single best fix here is to add a root-level
permissions:block after theon:section (or beforeconcurrency:) in.github/workflows/integration.yaml, specifyingcontents: read. If you want to be extra explicit, you can also addpackages: readandactions: read, but the minimal CodeQL-satisfying, least-privilege change iscontents: read. This will ensure thatGITHUB_TOKENcannot be used by this workflow to write to the repository, while preserving all current behavior. No imports or other definitions are needed because this is pure YAML configuration.