-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgcloud-ops.json
More file actions
113 lines (113 loc) · 3.45 KB
/
gcloud-ops.json
File metadata and controls
113 lines (113 loc) · 3.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
"version": "0.2",
"identity_profiles": [
{
"id": "gcp-agent",
"provider": "none",
"subject": {
"kind": "service",
"principal": "agent://ops/gcp",
"display_name": "GCP Operations Agent",
"delegation_mode": "none"
},
"trust": {
"level": "supervised",
"constraints": {
"max_autonomy": "supervised",
"escalation": "fail"
}
}
}
],
"evidence_profiles": [
{
"id": "gcp-evidence",
"provider": "ssh",
"payload": {
"bind": ["execution_id", "declared_identity", "command", "result"],
"format": "canonical-json"
},
"verify": { "required": false }
}
],
"workflows": [
{
"id": "gcloud-ops",
"name": "Google Cloud Operations",
"contract": {
"sandbox": "permissive",
"network": "unrestricted",
"audit": "always"
},
"tasks": [
{
"id": "whoami",
"name": "Check GCP Auth",
"shell": {
"program": "gcloud",
"args": ["auth", "print-identity-token"]
},
"target": { "session_target": "shell" },
"identity": { "ref": "gcp-agent" },
"evidence": { "ref": "gcp-evidence" },
"output": { "format": "text" },
"schedule": { "cron": "0 */6 * * *" }
},
{
"id": "list-instances",
"name": "List Compute Instances",
"shell": {
"program": "gcloud",
"args": ["compute", "instances", "list", "--format=json"]
},
"target": { "session_target": "shell" },
"identity": { "ref": "gcp-agent" },
"evidence": { "ref": "gcp-evidence" },
"output": {
"format": "json",
"preview_bytes": 8000
},
"schedule": { "cron": "0 */4 * * *" },
"on_failure": {
"id": "triage-list-instances",
"name": "Triage Instance List Failure",
"prompt": "The gcloud compute instances list command failed. Determine whether this is an authentication issue, project configuration problem, or API error, and recommend the next step.",
"target": { "session_target": "isolated", "agent_id": "main" },
"intent": { "mode": "plan", "read_only": true },
"context": { "retrieval": "recent", "limit": 3 },
"delivery": { "mode": "announce", "to": "@owner_dm" }
}
},
{
"id": "list-clusters",
"name": "List GKE Clusters",
"shell": {
"program": "gcloud",
"args": ["container", "clusters", "list", "--format=json"]
},
"target": { "session_target": "shell" },
"identity": { "ref": "gcp-agent" },
"evidence": { "ref": "gcp-evidence" },
"output": {
"format": "json",
"preview_bytes": 4000
},
"schedule": { "cron": "0 */6 * * *" }
},
{
"id": "check-billing",
"name": "Check Billing Accounts",
"shell": {
"program": "gcloud",
"args": ["billing", "accounts", "list", "--format=json"]
},
"target": { "session_target": "shell" },
"identity": { "ref": "gcp-agent" },
"evidence": { "ref": "gcp-evidence" },
"output": { "format": "json" },
"schedule": { "cron": "0 9 * * 1" }
}
]
}
]
}