Skip to content

fix(validation): lint workflows by explicit path - #369

Merged
pedropaulofb merged 1 commit into
masterfrom
fix/actionlint-isolated-validation
Sep 8, 2026
Merged

fix(validation): lint workflows by explicit path#369
pedropaulofb merged 1 commit into
masterfrom
fix/actionlint-isolated-validation

Conversation

@pedropaulofb

Copy link
Copy Markdown
Member

Summary

Fix the trusted final-state validator so that actionlint can validate workflow files from the isolated snapshot.

Problem

The validator intentionally copies the candidate repository without its .git directory. However, actionlint was invoked without explicit workflow paths and therefore attempted to discover a Git repository from /repo. This caused the final validation to fail with:

no project was found in any parent directories of "/repo"

Changes

  • Added actionlint_command(snapshot) to construct the isolated Docker command.
  • Passes explicit relative paths for all .yml and .yaml files under .github/workflows.
  • Preserves the existing isolated execution controls:
    • no network access;
    • read-only filesystem;
    • dropped capabilities;
    • non-root user;
    • no .git mount.
  • Added a regression test confirming that explicit workflow paths are included and .git is not mounted.

Validation

  • python -m pytest -q scripts/tests/test_pr_automation.py — 96 passed.
  • python -m pytest -q scripts/tests — 525 passed.
  • git diff --check — passed.

Docker is not installed locally, so the actionlint container was not run on the developer machine. The GitHub Actions validation will execute it in the intended containerized environment.

@pedropaulofb
pedropaulofb deployed to pr-automation September 8, 2026 12:23 — with GitHub Actions Active
@pedropaulofb
pedropaulofb deployed to pr-automation September 8, 2026 12:24 — with GitHub Actions Active
@pedropaulofb
pedropaulofb merged commit 783dbf1 into master Sep 8, 2026
7 checks passed
@pedropaulofb
pedropaulofb deleted the fix/actionlint-isolated-validation branch September 8, 2026 12:32
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.

1 participant