Skip to content

feat(yaml): extract bash script execution and imports from GitHub Actions workflows (#5565) - #5603

Closed
m3lonxd wants to merge 3 commits into
Graphify-Labs:v8from
m3lonxd:feat/gha-workflow-run-bash-edges-5565-v2
Closed

m3lonxd wants to merge 3 commits into
Graphify-Labs:v8from
m3lonxd:feat/gha-workflow-run-bash-edges-5565-v2

Conversation

@m3lonxd

@m3lonxd m3lonxd commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Fixes #5565

Replaces and fast-tracks #5584, cleanly rebased onto v0.9.123 (v8 @ 5d962d2d) per @safishamsi's review.

Summary of Changes

…ions workflows (Graphify-Labs#5565)

Extract script invocations and source imports from GitHub Actions workflow and
composite action `run:` steps, connecting workflow definitions to the bash
scripts and sourced functions they run.

- Extract `extract_bash_source` helper from `extract_bash` with optional
  line offset, base directory, and GHA expression neutralization without
  disturbing standalone .sh extraction.
- Cascade workflow-, job-, and step-level defaults for shells and working
  directories, requiring bash-compatible shells and rejecting Windows jobs
  unless explicit bash shell is specified.
- Support composite actions, relative paths, in-memory expression neutralization,
  and fail-closed security for traversal and UNC paths.

Fixes Graphify-Labs#5565
Replaces and fast-tracks Graphify-Labs#5584 rebased onto v0.9.123 (v8)
@m3lonxd
m3lonxd requested a review from safishamsi as a code owner November 28, 2026 21:32
@github-actions

Copy link
Copy Markdown

Thanks for the pull request, @m3lonxd. A maintainer will review it soon.

Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions.

A couple of things that speed up review: make sure the test suite passes on Python 3.11 and 3.13, and that the change keeps extraction deterministic.

@github-actions github-actions Bot added the contributor Pull request from a returning community contributor label Nov 28, 2026

@graphify-labs graphify-labs Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Graphify review View in Graphify

Nothing blocking · 4 possible issues to check · Merge confidence 5/5

4 possible issues to check · High impact

The change extracts script and source relationships from eligible GitHub Actions workflow and composite-action run steps, then passes those relationships through the existing Bash resolver.

4 possible issues we couldn't confirm

They don't change the score.

What this review covered
  • Some lookups asked for files or lines that do not exist; the review was told and carried on.
  • 4 of 4 changed files inspected. This is scope, not a correctness guarantee.
Code graph · 5438 functions depend on this change
  • 9 functions became more coupled. Largest: extract() (1434 callers), build_from_json() (354 callers), extract_yaml() (23 callers).
  • 386 of 658 test files are affected by this change.
  • Gate, test list and every flagged function: in the Graphify check.

Reviewed 0ad1005 · 7 earlier findings not re-checked

Comment thread graphify/extractors/bash.py Resolved
Comment thread graphify/extractors/yaml_config.py Resolved
safishamsi pushed a commit that referenced this pull request Nov 30, 2026
safishamsi added a commit that referenced this pull request Nov 30, 2026
Extractor accuracy (Swift #5641, Apex #5627, Python #5647, TypeScript
#5604/#5614/#5612, Bash caller-var #5602), GitHub Actions run-step
extraction (#5603), incremental correctness (#5634/#5638/#5636), symlink
and semantic-cache fixes (#5617/#5618), export/report hardening and perf
(#5643/#5644/#5645/#5646/#5619/#5620/#5621), and CLI/docs/skill/install
work (#5629/#5628/#5626/#5624/#5623/#5625/#5642/#5583). AST cache schema
59 to 60; Swift/Apex/Python/Bash/GHA inputs re-extract on first build.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@safishamsi

Copy link
Copy Markdown
Member

Landed in v0.9.124 (just released to PyPI), cherry-picked with your authorship preserved so it shows under your name in the history. Thanks @m3lonxd for extracting bash from GitHub Actions run: steps — verified green in the full suite and, where applicable, smoke-tested against the published package. 🙏

@safishamsi safishamsi closed this Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor Pull request from a returning community contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitHub Actions workflows: run: steps are not parsed as bash, so a workflow has no edge to the scripts it runs

2 participants