Skip to content

Commit 294e7b7

Browse files
dependabot[bot]MariusStorhaugCopilot
authored
⚙️ [Maintenance]: GitHub Actions checkouts use least-privilege settings (#412)
GitHub Actions workflows now use the pinned `actions/checkout` v7.0.1 release consistently, avoid unnecessary full-history downloads, and prevent checkout credentials from persisting in the workspace. Generated documentation is linted with Super-Linter using filesystem discovery restricted to Markdown files. ## Changed: Workflow checkout security and efficiency All checkout steps disable credential persistence because these workflows do not rely on the checkout repository for authenticated Git operations. Super-Linter uses filesystem discovery instead of Git, so full-history fetching is not required. ## Changed: Generated documentation lint scope The documentation build runs Super-Linter in local mode with filesystem discovery and limits the include pattern to generated `.md` and `.markdown` files. The default branch is not configured, avoiding Git branch comparison and keeping the lint focused on the documentation output. --- <details> <summary>Technical details</summary> - Updated all workflow references to the pinned `actions/checkout` v7.0.1 commit `3d3c42e5aac5ba805825da76410c181273ba90b1`. - Applied `persist-credentials: false` to all 28 checkout steps. - Configured `USE_FIND_ALGORITHM: true` for the Super-Linter invocations in `Linter.yml`, `Lint-Repository.yml`, and `Build-Docs.yml`. - Removed `DEFAULT_BRANCH` from the local documentation Super-Linter invocation. - Restricted `Build-Docs.yml` documentation linting to `outputs/docs` Markdown files with `FILTER_REGEX_INCLUDE`. - Removed all `fetch-depth: 0` settings; checkout now uses the action's shallow fetch default. - Updated the previously missed `.github/workflows/Test-Actions.yml` reference. - Standards and framework alignment: | Changed surface | Standards checked | Framework docs checked | Result | | --- | --- | --- | --- | | `.github/workflows/**` | GitHub Actions, least privilege, dependency pinning | Reusable workflow contract | Aligned | </details> <details> <summary>Relevant issues (or links)</summary> - No linked issue; this is a Dependabot dependency maintenance update. </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marius Storhaug <marstor@hotmail.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 2b7a3c2 commit 294e7b7

17 files changed

Lines changed: 32 additions & 41 deletions

.github/workflows/AfterAll-ModuleLocal.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,12 @@ jobs:
2626
SETTINGS: ${{ inputs.Settings }}
2727
steps:
2828
- name: Checkout Code
29-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
29+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3030
with:
3131
persist-credentials: false
32-
fetch-depth: 0
3332

3433
- name: Checkout Process-PSModule
35-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
34+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3635
with:
3736
repository: ${{ job.workflow_repository }}
3837
ref: ${{ job.workflow_sha }}

.github/workflows/BeforeAll-ModuleLocal.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,12 @@ jobs:
2626
Settings: ${{ inputs.Settings }}
2727
steps:
2828
- name: Checkout Code
29-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
29+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3030
with:
3131
persist-credentials: false
32-
fetch-depth: 0
3332

3433
- name: Checkout Process-PSModule
35-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
34+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3635
with:
3736
repository: ${{ job.workflow_repository }}
3837
ref: ${{ job.workflow_sha }}

.github/workflows/Build-Docs.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout Code
21-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
21+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2222
with:
2323
persist-credentials: false
24-
fetch-depth: 0
2524

2625
- name: Checkout Process-PSModule
27-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
26+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2827
with:
2928
repository: ${{ job.workflow_repository }}
3029
ref: ${{ job.workflow_sha }}
@@ -83,9 +82,8 @@ jobs:
8382
uses: super-linter/super-linter/slim@4ce20838b8ab83717e78138c5b3a1407148e0918 # v8.7.0
8483
env:
8584
RUN_LOCAL: true
86-
DEFAULT_BRANCH: main
8785
DEFAULT_WORKSPACE: ${{ fromJson(inputs.Settings).WorkingDirectory }}
88-
FILTER_REGEX_INCLUDE: ${{ fromJson(inputs.Settings).WorkingDirectory }}/outputs/docs
86+
FILTER_REGEX_INCLUDE: ${{ fromJson(inputs.Settings).WorkingDirectory }}/outputs/docs/.*\.(md|markdown)$
8987
ENABLE_GITHUB_ACTIONS_GROUP_TITLE: true
9088
GITHUB_TOKEN: ${{ github.token }}
9189
VALIDATE_ALL_CODEBASE: true
@@ -98,6 +96,7 @@ jobs:
9896
VALIDATE_MARKDOWN_PRETTIER: false
9997
VALIDATE_YAML_PRETTIER: false
10098
ENABLE_GITHUB_ACTIONS_STEP_SUMMARY: false
99+
USE_FIND_ALGORITHM: true
101100
SAVE_SUPER_LINTER_SUMMARY: true
102101

103102
- name: Post super-linter summary

.github/workflows/Build-Module.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,12 @@ jobs:
2424
GH_TOKEN: ${{ github.token }}
2525
steps:
2626
- name: Checkout Code
27-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
27+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2828
with:
2929
persist-credentials: false
30-
fetch-depth: 0
3130

3231
- name: Checkout Process-PSModule
33-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
32+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3433
with:
3534
repository: ${{ job.workflow_repository }}
3635
ref: ${{ job.workflow_sha }}

.github/workflows/Build-Site.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,12 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout Code
20-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
20+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2121
with:
2222
persist-credentials: false
23-
fetch-depth: 0
2423

2524
- name: Checkout Process-PSModule
26-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
25+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2726
with:
2827
repository: ${{ job.workflow_repository }}
2928
ref: ${{ job.workflow_sha }}

.github/workflows/Get-CodeCoverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout Process-PSModule
20-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
20+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2121
with:
2222
repository: ${{ job.workflow_repository }}
2323
ref: ${{ job.workflow_sha }}

.github/workflows/Get-TestResults.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- name: Checkout Process-PSModule
25-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
25+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2626
with:
2727
repository: ${{ job.workflow_repository }}
2828
ref: ${{ job.workflow_sha }}

.github/workflows/Lint-Repository.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ jobs:
2121
Settings: ${{ inputs.Settings }}
2222
steps:
2323
- name: Checkout repo
24-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
24+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2525
with:
2626
persist-credentials: false
27-
fetch-depth: 0
2827

2928
- name: Load dynamic envs
3029
shell: pwsh
@@ -56,6 +55,7 @@ jobs:
5655
FILTER_REGEX_INCLUDE: ${{ fromJson(env.Settings).WorkingDirectory }}
5756
FILTER_REGEX_EXCLUDE: ${{ fromJson(env.Settings).WorkingDirectory }}/src/classes/public/.*\.ps1$
5857
ENABLE_GITHUB_ACTIONS_STEP_SUMMARY: false
58+
USE_FIND_ALGORITHM: true
5959
SAVE_SUPER_LINTER_SUMMARY: true
6060

6161
- name: Post super-linter summary

.github/workflows/Lint-SourceCode.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
include: ${{ fromJson(inputs.Settings).Test.SourceCode.Suites }}
2222
steps:
2323
- name: Checkout Code
24-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
24+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2525
with:
2626
persist-credentials: false
2727

.github/workflows/Linter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout repo
22-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
22+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2323
with:
2424
persist-credentials: false
25-
fetch-depth: 0
2625

2726
- name: Lint code base
2827
uses: super-linter/super-linter@4ce20838b8ab83717e78138c5b3a1407148e0918 # v8.7.0
@@ -35,3 +34,4 @@ jobs:
3534
VALIDATE_JSON_PRETTIER: false
3635
VALIDATE_MARKDOWN_PRETTIER: false
3736
VALIDATE_YAML_PRETTIER: false
37+
USE_FIND_ALGORITHM: true

0 commit comments

Comments
 (0)