Skip to content
Open
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
23 changes: 15 additions & 8 deletions .github/actions/setup-zizmor-config/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@ runs:
- name: Ensure default zizmor.yml
shell: bash
run: |
if [ ! -f zizmor.yml ]; then
# Create zizmor config if missing
if [[ ! -f zizmor.yml ]]; then
echo "Creating a custom zizmor.yml configuration file for CI..."
cat > zizmor.yml << 'EOF'
rules:
dependabot-cooldown:
disable: true
EOF
else
echo "⊘ Found existing zizmor.yml configuration file"
echo $'rules:\n' > zizmor.yml
fi

# Patch (merge) with extra config
echo "Patching zizmor.yml configuration file for CI..."
Comment on lines +15 to +16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: just change description to

Ensures zizmor.yml exists and patches CI-specific Zizmor rules

yq -i '
.rules |= (. // {}) |
.rules."dependabot-cooldown" |= (. // {}) |
.rules."dependabot-cooldown".disable |= true |
.rules."unpinned-uses" |= (. // {}) |
.rules."unpinned-uses".config |= (. // {}) |
.rules."unpinned-uses".config.policies |= (. // {}) |
.rules."unpinned-uses".config.policies."MiraGeoscience/*" |= "ref-pin"
' zizmor.yml
2 changes: 1 addition & 1 deletion .github/workflows/reusable-zizmor-annotate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
persist-credentials: false

- name: Setup Zizmor Config
uses: MiraGeoscience/CI-tools/.github/actions/setup-zizmor-config@v2
uses: MiraGeoscience/CI-tools/.github/actions/setup-zizmor-config@v3.1

Comment on lines 38 to 40
- name: Run Zizmor Security Scan
uses: zizmorcore/zizmor-action@0dce2577a4760a2749d8cfb7a84b7d5585ebcb7d
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-zizmor-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
persist-credentials: false

- name: Setup Zizmor Config
uses: MiraGeoscience/CI-tools/.github/actions/setup-zizmor-config@v2
uses: MiraGeoscience/CI-tools/.github/actions/setup-zizmor-config@v3.1

Comment on lines 37 to 39
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: tag v3.1 and move all actions to use v3.1 instead of v2

- name: Run Zizmor Security Scan
uses: zizmorcore/zizmor-action@0dce2577a4760a2749d8cfb7a84b7d5585ebcb7d
Expand Down
Loading