Skip to content

Implement zizmor and actionlint for GitHub Actions auditing #3494

@burnash

Description

@burnash

Background

During the review of #3470, @rmuir pointed out that the dlt repository's GitHub Actions workflows are currently running with excessive privileges. This was the default org-level setting that grants full write access to GitHub tokens in use in workflows. This creates potential security risks.

Solution

Implement two tools for GitHub Actions analysis:

  1. https://github.com/zizmorcore/zizmor
  2. https://github.com/rhysd/actionlint

Tasks

  1. Research current workflow permissions: audit all existing .github/workflows/* files.
  2. Add explicit permissions to all workflows. e.g. permissions: {} at workflow level to deny by default. Add minimal required permissions at job level where needed
  3. Create CI workflow for workflow validation. See example implementation (from Apache Lucene): https://github.com/apache/lucene/blob/main/.github/workflows/actions.yml
  4. Configure triggers
    • on PRs that modify .github/** paths
    • on pushes to master/devel branches affecting .github/**

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions