Skip to content

DEVOPS-977: default zizmor config to allow MiraGeoscience unpinned act…#152

Open
andrewg-mira wants to merge 1 commit intomainfrom
DEVOPS-977-allow-mira-github-actions-tags
Open

DEVOPS-977: default zizmor config to allow MiraGeoscience unpinned act…#152
andrewg-mira wants to merge 1 commit intomainfrom
DEVOPS-977-allow-mira-github-actions-tags

Conversation

@andrewg-mira
Copy link
Contributor

@andrewg-mira andrewg-mira commented Feb 3, 2026

DEVOPS-977 - Zizmor: Allow trusted tag-pinned github actions
…ions

@github-actions github-actions bot changed the title DEVOPS-977 default zizmor config to allow MiraGeoscience unpinned act… DEVOPS-977: default zizmor config to allow MiraGeoscience unpinned act… Feb 3, 2026
Copy link
Contributor

@sebhmg sebhmg left a comment

Choose a reason for hiding this comment

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

see suggestion for merging config with existing zizmor file

shell: bash
run: |
if [ ! -f zizmor.yml ]; then
if [[ ! -f zizmor.yml || $(wc -l < zizmor.yml) -eq 1 ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: patch existing zizmor config, even if it has more than one line

uses yq (yq is installed on Ubuntu according to https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md)

      run: |
        # Create zizmor config if missing
        if [[ ! -f zizmor.yml || $(wc -l < zizmor.yml) -eq 1 ]]; thenif [[ ! -f zizmor.yml ]]; then
          echo "Creating a custom zizmor.yml configuration file for CI..."
          cat > zizmor.yml << 'EOF'
        rules:
          dependabot-cooldown:
            disable: trueEOF
        fi

        # Patch (merge) with extra config
        yq -i '
          .rules |= (. // {}) |
          .rules."unpinned-uses" |= (. // {}) |
          .rules."unpinned-uses".config |= (. // {}) |
          .rules."unpinned-uses".config.policies |= (. // {}) |
          .rules."unpinned-uses".config.policies."MiraGeoscience/*" = "any"
        ' zizmor.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants