Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ jobs:

# PYSEC-2026-1325 (ecdsa) has no fix version — it is ecdsa's documented
# lack of side-channel resistance, reachable only for ES* JWT algorithms,
# and this service signs RS256. Rationale in full in scripts/audit.sh.
# and this service signs RS256. CVE-2026-85394 (python-jose) has no fix
# version and needs HS256 to be accepted; the only jwt.decode call pins
# algorithms=[RS256]. Rationale in full in scripts/audit.sh.
- name: Known CVEs (pip-audit)
run: pip-audit -r requirements.txt --ignore-vuln PYSEC-2026-1325
run: pip-audit -r requirements.txt --ignore-vuln PYSEC-2026-1325 --ignore-vuln CVE-2026-85394

- name: Dead code (vulture)
run: vulture . --config pyproject.toml
Expand Down
2 changes: 1 addition & 1 deletion CASCADE-app/components/canvas/canvas-legend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function LegendShape({ type, size = 14, fill }: { type: string; size?: number; f
return <svg width={size} height={size} style={{ flexShrink: 0 }}><polygon points={pts} fill={fill} /></svg>;
}
if (type === "personnel") {
return <svg width={size} height={size} style={{ flexShrink: 0 }}><rect x={1} y={1} width={size-2} height={size-2} rx={size*0.2} fill={fill} /></svg>;
return <svg width={size} height={size} style={{ flexShrink: 0 }}><rect x={1} y={1} width={size-2} height={size-2} fill={fill} /></svg>;
}
// service / default → circle
return <svg width={size} height={size} style={{ flexShrink: 0 }}><circle cx={h} cy={h} r={h-1} fill={fill} /></svg>;
Expand Down
9 changes: 4 additions & 5 deletions CASCADE-app/components/canvas/cascade-node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Source → diamond
* Infrastructure → octagon
* Service → circle
* Personnel → rounded-square
* Personnel → square
*
* Node size ∝ importance; fill = Functionality level colour from config.
* functionality_time > 0 → pulsing amber ring; direct_damage → crack overlay.
Expand Down Expand Up @@ -131,12 +131,11 @@ function Circle({ size, fill, stroke = brandColor("neutral", 200), strokeWidth =
);
}

function RoundedSquare({ size, fill, stroke = brandColor("neutral", 200), strokeWidth = 2.5, strokeDasharray, strokeDashoffset }: ShapeProps) {
function Square({ size, fill, stroke = brandColor("neutral", 200), strokeWidth = 2.5, strokeDasharray, strokeDashoffset }: ShapeProps) {
return (
<rect
x={1} y={1}
width={size - 2} height={size - 2}
rx={size * 0.2} ry={size * 0.2}
fill={fill}
stroke={stroke}
strokeWidth={strokeWidth}
Expand All @@ -152,7 +151,7 @@ function RoundedSquare({ size, fill, stroke = brandColor("neutral", 200), stroke
// category names appear in user configs.
// ---------------------------------------------------------------------------

type ShapeType = typeof Diamond | typeof Octagon | typeof Circle | typeof RoundedSquare;
type ShapeType = typeof Diamond | typeof Octagon | typeof Circle | typeof Square;

// ---------------------------------------------------------------------------
// Category icons — rendered as absolutely-positioned Lucide icons inside the shape
Expand Down Expand Up @@ -419,7 +418,7 @@ InfrastructureNode.displayName = "InfrastructureNode";
const ServiceNode = memo(({ data, selected }: RFNodeProps) => <CascadeNodeBase data={data} Shape={Circle} selected={selected} />);
ServiceNode.displayName = "ServiceNode";

const PersonnelNode = memo(({ data, selected }: RFNodeProps) => <CascadeNodeBase data={data} Shape={RoundedSquare} selected={selected} />);
const PersonnelNode = memo(({ data, selected }: RFNodeProps) => <CascadeNodeBase data={data} Shape={Square} selected={selected} />);
PersonnelNode.displayName = "PersonnelNode";

export const nodeTypes: NodeTypes = {
Expand Down
56 changes: 28 additions & 28 deletions CASCADE-app/samples/public/Palmanova_Complete.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"id": "node_1762946740143",
"functionality": 3,
"label": "water Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -47,7 +47,7 @@
"id": "node_1762946753934",
"functionality": 3,
"label": "electric Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -76,7 +76,7 @@
"id": "node_1769766555762",
"functionality": 3,
"label": "transport Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -306,7 +306,7 @@
"id": "node_1764760818917",
"functionality": 3,
"label": "civil protection Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -7632,7 +7632,7 @@
"id": "node_1762946740143",
"functionality": 3,
"label": "water Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -7667,7 +7667,7 @@
"id": "node_1762946753934",
"functionality": 3,
"label": "electric Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -7696,7 +7696,7 @@
"id": "node_1769766555762",
"functionality": 3,
"label": "transport Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -7926,7 +7926,7 @@
"id": "node_1764760818917",
"functionality": 3,
"label": "civil protection Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -10069,7 +10069,7 @@
"id": "node_1762946740143",
"functionality": 3,
"label": "water Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -10104,7 +10104,7 @@
"id": "node_1762946753934",
"functionality": 3,
"label": "electric Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -10133,7 +10133,7 @@
"id": "node_1769766555762",
"functionality": 3,
"label": "transport Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -10394,7 +10394,7 @@
"id": "node_1764760818917",
"functionality": 3,
"label": "civil protection Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -12634,7 +12634,7 @@
"id": "node_1762946740143",
"functionality": 1,
"label": "water Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -12669,7 +12669,7 @@
"id": "node_1762946753934",
"functionality": 3,
"label": "electric Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -12698,7 +12698,7 @@
"id": "node_1769766555762",
"functionality": 3,
"label": "transport Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -12928,7 +12928,7 @@
"id": "node_1764760818917",
"functionality": 3,
"label": "civil protection Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -15071,7 +15071,7 @@
"id": "node_1762946740143",
"functionality": 1,
"label": "water Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -15106,7 +15106,7 @@
"id": "node_1762946753934",
"functionality": 3,
"label": "electric Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -15135,7 +15135,7 @@
"id": "node_1769766555762",
"functionality": 3,
"label": "transport Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -15396,7 +15396,7 @@
"id": "node_1764760818917",
"functionality": 3,
"label": "civil protection Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -17707,7 +17707,7 @@
"id": "node_1762946740143",
"functionality": 3,
"label": "water Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -17742,7 +17742,7 @@
"id": "node_1762946753934",
"functionality": 3,
"label": "electric Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -17771,7 +17771,7 @@
"id": "node_1769766555762",
"functionality": 3,
"label": "transport Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -18001,7 +18001,7 @@
"id": "node_1764760818917",
"functionality": 3,
"label": "civil protection Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -20144,7 +20144,7 @@
"id": "node_1762946740143",
"functionality": 3,
"label": "water Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -20179,7 +20179,7 @@
"id": "node_1762946753934",
"functionality": 3,
"label": "electric Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -20208,7 +20208,7 @@
"id": "node_1769766555762",
"functionality": 3,
"label": "transport Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down Expand Up @@ -20463,7 +20463,7 @@
"id": "node_1764760818917",
"functionality": 3,
"label": "civil protection Operator",
"node_type": "Infrastructure",
"node_type": "Personnel",
"node_categories": [
"manager"
],
Expand Down
Loading
Loading