Skip to content

cybersecurity-attack-paths: fix p.relationships label handling (1.17+ format), pin 1.21.1#99

Open
rygao wants to merge 1 commit into
mainfrom
paths/align-1.21
Open

cybersecurity-attack-paths: fix p.relationships label handling (1.17+ format), pin 1.21.1#99
rygao wants to merge 1 commit into
mainfrom
paths/align-1.21

Conversation

@rygao

@rygao rygao commented Jul 16, 2026

Copy link
Copy Markdown
Member

Follow-up to #87, narrowed to the one path template that needs a code fix for post-1.15 PyRel changes.

Change

p.relationships changed format in relationalai 1.17 — from a decorated string (-⟨exploit_to⟩→) to the dotted relationship name (Asset.exploit_to). This template's 1.15-era decoration-stripping no longer stripped anything and chopped the wrong characters, so every printed kill-chain technique came out as Asset.exploit / Asset.cred / Asset.pivot. The template now prints the raw label as-is (zero parsing), the README/runbook expected outputs are updated to match, and the pin moves 1.15.01.21.1.

Verification

Run end-to-end on relationalai==1.21.1 against a live engine; printed kill-chains match the updated docs:

[3 hops] VPN Gateway  --[Asset.exploit_to]-->  Jump Host  --[Asset.cred_to]-->  File Server  --[Asset.pivot_to]-->  Customer Database

Deliberately not included

  • bom-reachability, it-dependency-mapping, energy_grid_planning, telco_network_recovery: no substantive changes needed — each was run end-to-end on 1.21.1 with its current (1.15-pinned) code and passes unchanged. Their pins/doc version references can move when there's a real reason to touch them.
  • memory_supply_allocation (pins 1.11.0; runbook references the pre-rename std/paths doc path) and book_slate_recommendation (pins 1.1.0; imports the deprecated relationalai.semantics.std.paths): pre-paths templates: 3 incorporations + 2 new (it-dependency-mapping, cybersecurity-attack-paths), on relationalai 1.15 #87 path templates, flagged for separate follow-up.

🤖 Generated with Claude Code

…nalai 1.21.1

p.relationships changed format in relationalai 1.17: from a decorated
string ("-<rel>->") to the dotted relationship name ("Asset.exploit_to").
The 1.15-era decoration stripping no longer stripped anything and mangled
every printed technique (e.g. "Asset.exploit"). Print the raw label
as-is, update README/runbook expected output to match, and bump the pin
1.15.0 -> 1.21.1 (verified end-to-end against a live engine).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@rygao
rygao force-pushed the paths/align-1.21 branch from b68ed0c to 47a506b Compare July 21, 2026 15:57
@rygao rygao changed the title paths templates: align to relationalai 1.21.1 (follow-up to #87) cybersecurity-attack-paths: fix p.relationships label handling (1.17+ format), pin 1.21.1 Jul 21, 2026
@rygao
rygao marked this pull request as ready for review July 21, 2026 16:07
@rygao
rygao requested review from NHDaly, Sacha0 and cafzal July 21, 2026 16:07

- Python >= 3.10.
- `relationalai` SDK >= 1.15 (path enumeration with multi-edge patterns is a preview capability) and the `rai` CLI, both installed by the Quickstart steps below.
- `relationalai` SDK >= 1.21 (path enumeration with multi-edge patterns is a preview capability) and the `rai` CLI, both installed by the Quickstart steps below.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't understand the part of the PR comment:

no substantive changes needed — each was run end-to-end on 1.21.1 with its current (1.15-pinned) code and passes unchanged. Their pins/doc version references can move when there's a real reason to touch them.

Seems like we should update their pins too, right? Otherwise the AIs learning from these examples will think they need to run on older versions?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Question for @cafzal: Is it better to leave these minimum bounds more permissive, or to keep things updated to encourage the AIs that are reading these files to use the latest version?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

just focus on supporting 1.21+. we'll make that clear in skills repo readme and setup skill

@@ -157,16 +157,12 @@ def load_csv(filename):
hop_df = hop_df.drop_duplicates(["path_id", "hop"]).sort_values(["path_id", "hop"])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we need to drop duplicates? There shouldn't be any, right?
And similarly I guess the data is also sorted by path_id, hop.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Probably a question for @cafzal

@Sacha0 Sacha0 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.

LGTM modulo Nathan's good questions, thanks Ryan!

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.

4 participants