Skip to content

Commit da395db

Browse files
imge version updated
1 parent 179a984 commit da395db

File tree

1 file changed

+28
-23
lines changed

1 file changed

+28
-23
lines changed

.github/workflows/wf2.yml

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
1-
name: Test GitHubToken Excessive Permissions
2-
on:
3-
push:
4-
branches:
5-
- main
1+
name: mongodb github action
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
action-tag:
7+
description: 'Tag for the action'
8+
required: true
9+
default: 'main'
10+
611
jobs:
7-
test-permissions:
12+
mongodb-action:
13+
name: Start MongoDB Server v${{ matrix.mongodb-version }}
14+
815
runs-on: ubuntu-latest
9-
# Overly broad permissions for GITHUB_TOKEN
10-
permissions:
11-
contents: write
12-
issues: write
13-
pull-requests: write
14-
actions: write
15-
checks: write
16-
deployments: write
17-
statuses: write
18-
packages: write
19-
repository-projects: write
20-
discussions: write
21-
security-events: write # This one, in particular, should raise a flag as it's typically not needed for most workflows
16+
strategy:
17+
matrix:
18+
mongodb-version: ['4.0', '4.2', '4.4', '5.0', '6.0']
19+
2220
steps:
23-
- name: Checkout code
24-
uses: actions/checkout@v3
25-
- name: Dummy Step
26-
run: echo "This is to test excessive token permissions"
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Start MongoDB Server
25+
uses: step-security/dynamic-uses@v1
26+
with:
27+
uses: step-security/mongodb-github-action@${{ github.event.inputs.action-tag }}
28+
with: >
29+
{
30+
"mongodb-version": ${{ matrix.mongodb-version }}
31+
}

0 commit comments

Comments
 (0)