Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
MINVERBUILDMETADATA: build.${{github.run_number}}

steps:
- name: Harden Runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
Expand Down
33 changes: 19 additions & 14 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
schedule:
- cron: '27 10 * * 1'
- cron: "27 10 * * 1"

permissions:
contents: read
Expand All @@ -21,18 +21,23 @@
security-events: write

steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
- name: Harden Runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit

- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0

Check warning

Code scanning / zizmor

credential persistence through GitHub Actions artifacts Warning

credential persistence through GitHub Actions artifacts

- name: Initialize CodeQL
uses: github/codeql-action/init@014f16e7ab1402f30e7c3329d33797e7948572db # v4.31.3
with:
languages: 'csharp'
debug: true
- name: Initialize CodeQL
uses: github/codeql-action/init@014f16e7ab1402f30e7c3329d33797e7948572db # v4.31.3
with:
languages: "csharp"
debug: true

- name: Autobuild
uses: github/codeql-action/autobuild@014f16e7ab1402f30e7c3329d33797e7948572db # v4.31.3
- name: Autobuild
uses: github/codeql-action/autobuild@014f16e7ab1402f30e7c3329d33797e7948572db # v4.31.3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@014f16e7ab1402f30e7c3329d33797e7948572db # v4.31.3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@014f16e7ab1402f30e7c3329d33797e7948572db # v4.31.3
11 changes: 8 additions & 3 deletions .github/workflows/detector-version-bump-reminder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@ name: "Detector version bump reminder"
on:
push:
paths:
- 'src/Microsoft.ComponentDetection.Detectors/**'
- "src/Microsoft.ComponentDetection.Detectors/**"

permissions:
pull-requests: write

jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit

- uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -20,5 +25,5 @@ jobs:
* The detector detects more or fewer components than before
* The detector generates different parent/child graph relationships than before
* The detector generates different `devDependencies` values than before

If none of the above scenarios apply, feel free to ignore this comment 🙂
19 changes: 12 additions & 7 deletions .github/workflows/gen-docs.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
name: 'Generate docs'
name: "Generate docs"

on:
push:
branches:
- main
paths:
- 'src/Microsoft.ComponentDetection.Orchestrator/ArgumentSets/*.cs'
- "src/Microsoft.ComponentDetection.Orchestrator/ArgumentSets/*.cs"

permissions:
contents: read

jobs:
gen-docs:
permissions:
contents: write # for stefanzweifel/git-auto-commit-action to push code in repo
contents: write # for stefanzweifel/git-auto-commit-action to push code in repo
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit

- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
Expand All @@ -27,12 +32,12 @@ jobs:
run: |
touch version.json
touch version_dev.json

# Run CLI
dotnet run -p src/Microsoft.ComponentDetection help scan 2> help.txt || true
cat <<EOF > docs/detector-arguments.md
# Detector arguments

\`\`\`shell
dotnet run -p './src/Microsoft.ComponentDetection' help scan
\`\`\`
Expand All @@ -45,5 +50,5 @@ jobs:
- name: Commit
uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 # v7.0.0
with:
commit_message: 'Update docs'
file_pattern: '*.md'
commit_message: "Update docs"
file_pattern: "*.md"
9 changes: 7 additions & 2 deletions .github/workflows/ossf-scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ on:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '44 3 * * 5'
- cron: "44 3 * * 5"
push:
branches: [ "main" ]
branches: ["main"]

# Declare default permissions as read only.
permissions: read-all
Expand All @@ -31,6 +31,11 @@ jobs:
# actions: read

steps:
- name: Harden Runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit

- name: "Checkout code"
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ jobs:
pull-requests: read
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit

- uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6
with:
disable-autolabeler: true
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ jobs:
MINVERBUILDMETADATA: build.${{github.run_number}}

steps:
- name: Harden Runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,15 @@ jobs:
max-parallel: 4 # limit the total number of running jobs to avoid rate limiting
name: ${{ matrix.language.name }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit

- name: Checkout Component Detection
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Prepare Dotnet
- name: Prepare Dotnet
run: |
# When using a Vanilla Ubuntu image, GH Actions may not have access to the /usr/share/dotnet directory.
sudo mkdir /usr/share/dotnet
Expand Down Expand Up @@ -85,6 +90,11 @@ jobs:
permissions:
issues: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit

- name: Create GitHub Issue
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/snapshot-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Harden Runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit

- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Setup .NET Core
Expand All @@ -33,7 +38,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6
with:
python-version: '3.10'
python-version: "3.10"

- name: Install Apache Ivy
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/snapshot-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Harden Runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit

- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Make release snapshot output directory
Expand Down Expand Up @@ -57,7 +62,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6
with:
python-version: '3.10'
python-version: "3.10"

- run: dotnet restore

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ jobs:
permissions:
security-events: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
Expand Down