aegis-devops 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aegis_core/__init__.py +7 -0
- aegis_core/_examples/__init__.py +0 -0
- aegis_core/_examples/__pycache__/__init__.cpython-312.pyc +0 -0
- aegis_core/_examples/authority.example.yaml +12 -0
- aegis_core/_examples/authority.example.yaml.sig +2 -0
- aegis_core/_examples/constraints.example.yaml +338 -0
- aegis_core/_examples/constraints.example.yaml.sig +2 -0
- aegis_core/_examples/environments.example.yaml +51 -0
- aegis_core/_examples/environments.example.yaml.sig +2 -0
- aegis_core/_examples/example-signing.key +7 -0
- aegis_core/_examples/plan_constraints.example.yaml +76 -0
- aegis_core/_examples/plan_constraints.example.yaml.sig +2 -0
- aegis_core/_examples/sources/AEGIS-MANIFEST.sig +32 -0
- aegis_core/_examples/sources/PRINCIPALS.yaml +31 -0
- aegis_core/_examples/sources/git-4001.json +17 -0
- aegis_core/_examples/sources/git-789abc.json +17 -0
- aegis_core/_examples/sources/git-abc123.json +15 -0
- aegis_core/_examples/sources/git-bcd234.json +15 -0
- aegis_core/_examples/sources/git-def456.json +16 -0
- aegis_core/_examples/sources/jira-1001.json +28 -0
- aegis_core/_examples/sources/jira-1002.json +16 -0
- aegis_core/_examples/sources/jira-2001.json +17 -0
- aegis_core/_examples/sources/jira-2002.json +15 -0
- aegis_core/_examples/sources/jira-3001.json +17 -0
- aegis_core/_examples/sources/jira-3002.json +15 -0
- aegis_core/_examples/sources/jira-3003.json +17 -0
- aegis_core/_examples/sources/jira-3004.json +17 -0
- aegis_core/_examples/sources/jira-3005.json +17 -0
- aegis_core/_examples/sources/jira-5001.json +17 -0
- aegis_core/_examples/sources/jira-5002.json +15 -0
- aegis_core/_examples/sources/jira-5003.json +18 -0
- aegis_core/_examples/sources/jira-5004.json +17 -0
- aegis_core/_examples/sources/jira-5006.json +15 -0
- aegis_core/_examples/sources/plan-1001.json +10 -0
- aegis_core/_examples/sources/plan-1002.json +17 -0
- aegis_core/_examples/sources/plan-1003.json +24 -0
- aegis_core/_examples/sources/plan-1004.json +18 -0
- aegis_core/_examples/sources/plan-5005.json +16 -0
- aegis_core/_examples/sources/slack-perma-1.json +18 -0
- aegis_core/adversarial.py +708 -0
- aegis_core/authority.py +49 -0
- aegis_core/baselines/__init__.py +11 -0
- aegis_core/baselines/base.py +43 -0
- aegis_core/baselines/external.py +483 -0
- aegis_core/baselines/llm.py +363 -0
- aegis_core/baselines/metrics.py +143 -0
- aegis_core/baselines/opa.py +222 -0
- aegis_core/cli.py +1073 -0
- aegis_core/config.py +186 -0
- aegis_core/environments.py +292 -0
- aegis_core/intent.py +43 -0
- aegis_core/interceptor.py +328 -0
- aegis_core/ledger.py +484 -0
- aegis_core/parser.py +2767 -0
- aegis_core/parsers/__init__.py +27 -0
- aegis_core/parsers/pulumi.py +218 -0
- aegis_core/parsers/sql.py +1062 -0
- aegis_core/plan.py +703 -0
- aegis_core/provenance.py +260 -0
- aegis_core/shell.py +574 -0
- aegis_core/signing.py +301 -0
- aegis_core/store.py +1054 -0
- aegis_devops-0.1.0.dist-info/METADATA +933 -0
- aegis_devops-0.1.0.dist-info/RECORD +68 -0
- aegis_devops-0.1.0.dist-info/WHEEL +5 -0
- aegis_devops-0.1.0.dist-info/entry_points.txt +2 -0
- aegis_devops-0.1.0.dist-info/licenses/LICENSE +202 -0
- aegis_devops-0.1.0.dist-info/top_level.txt +1 -0
aegis_core/__init__.py
ADDED
|
File without changes
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Which principal may assert which class of constraint.
|
|
2
|
+
# Loaded via aegis_core.authority.load_authority_map(path).
|
|
3
|
+
principals:
|
|
4
|
+
admin:
|
|
5
|
+
- scaling
|
|
6
|
+
- deletion
|
|
7
|
+
- configuration
|
|
8
|
+
sre_lead:
|
|
9
|
+
- scaling
|
|
10
|
+
- configuration
|
|
11
|
+
developer:
|
|
12
|
+
- configuration
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
constraints:
|
|
2
|
+
- id: no-scale-prod-peak
|
|
3
|
+
provider: kubernetes
|
|
4
|
+
resource_pattern: deployment/*
|
|
5
|
+
actions:
|
|
6
|
+
- scale
|
|
7
|
+
scope:
|
|
8
|
+
namespace: prod
|
|
9
|
+
time_window:
|
|
10
|
+
days:
|
|
11
|
+
- Mon
|
|
12
|
+
- Tue
|
|
13
|
+
- Wed
|
|
14
|
+
- Thu
|
|
15
|
+
- Fri
|
|
16
|
+
start: 09:00
|
|
17
|
+
end: '17:00'
|
|
18
|
+
tz: America/New_York
|
|
19
|
+
effect: BLOCK
|
|
20
|
+
constraint_class: scaling
|
|
21
|
+
principal: sre_lead
|
|
22
|
+
source_ref: jira-1001
|
|
23
|
+
source_timestamp: '2026-01-15T09:00:00+00:00'
|
|
24
|
+
rule_text: Do not scale deployments in prod during business hours (09:00-17:00 ET,
|
|
25
|
+
weekdays).
|
|
26
|
+
provenance_hash: f3af697890dc757effcf13cdfcc9e4624e32aa65dd3114c348674ddcda0f2244
|
|
27
|
+
- id: no-delete-nodes
|
|
28
|
+
provider: kubernetes
|
|
29
|
+
resource_pattern: node/*
|
|
30
|
+
actions:
|
|
31
|
+
- delete
|
|
32
|
+
scope: {}
|
|
33
|
+
time_window: null
|
|
34
|
+
effect: BLOCK
|
|
35
|
+
constraint_class: deletion
|
|
36
|
+
principal: admin
|
|
37
|
+
source_ref: git-abc123
|
|
38
|
+
source_timestamp: '2026-02-01T12:00:00+00:00'
|
|
39
|
+
rule_text: Never delete cluster nodes directly; drain and cordon through the runbook
|
|
40
|
+
instead.
|
|
41
|
+
provenance_hash: fd5a01ddabc24b1203b65dd2503be114d88d5de909b2bb1ca41ecbd2e02d078a
|
|
42
|
+
- id: escalate-terraform-prod-destroy
|
|
43
|
+
provider: terraform
|
|
44
|
+
resource_pattern: aws_instance.*
|
|
45
|
+
actions:
|
|
46
|
+
- delete
|
|
47
|
+
- replace
|
|
48
|
+
scope:
|
|
49
|
+
region: us-east-1
|
|
50
|
+
time_window: null
|
|
51
|
+
effect: ESCALATE
|
|
52
|
+
constraint_class: deletion
|
|
53
|
+
principal: admin
|
|
54
|
+
source_ref: slack-perma-1
|
|
55
|
+
source_timestamp: '2026-02-10T18:30:00+00:00'
|
|
56
|
+
rule_text: Escalate any destructive terraform change to prod EC2 instances in us-east-1
|
|
57
|
+
for human review.
|
|
58
|
+
provenance_hash: 6d366d7ed1a8abbcc4e2979cbfe54fc0d2414f75ca1728ddbe4e689d3e8e23c7
|
|
59
|
+
- id: escalate-configmap-changes
|
|
60
|
+
provider: kubernetes
|
|
61
|
+
resource_pattern: configmap/*
|
|
62
|
+
actions:
|
|
63
|
+
- delete
|
|
64
|
+
- update
|
|
65
|
+
scope: {}
|
|
66
|
+
time_window: null
|
|
67
|
+
effect: ESCALATE
|
|
68
|
+
constraint_class: configuration
|
|
69
|
+
principal: developer
|
|
70
|
+
source_ref: jira-1002
|
|
71
|
+
source_timestamp: '2026-03-01T08:00:00+00:00'
|
|
72
|
+
rule_text: Escalate configmap changes for review before they are applied.
|
|
73
|
+
provenance_hash: 3dcb8a4cbe56e36e338a8db7ac50ef9436e9314a8be49d1c914abb148c5a23dd
|
|
74
|
+
- id: no-direct-asg-changes
|
|
75
|
+
provider: terraform
|
|
76
|
+
resource_pattern: aws_autoscaling_group.*
|
|
77
|
+
actions:
|
|
78
|
+
- update
|
|
79
|
+
scope: {}
|
|
80
|
+
time_window: null
|
|
81
|
+
effect: BLOCK
|
|
82
|
+
constraint_class: scaling
|
|
83
|
+
principal: admin
|
|
84
|
+
source_ref: git-bcd234
|
|
85
|
+
source_timestamp: '2026-03-05T14:00:00+00:00'
|
|
86
|
+
rule_text: Block direct terraform changes to autoscaling groups; use the scaling
|
|
87
|
+
API instead.
|
|
88
|
+
provenance_hash: afa75ac708a069a8b6f7c7594f46719a450dcaf7818c29090099bd1e80b4deb6
|
|
89
|
+
- id: aws-no-delete-ec2-us-east-1
|
|
90
|
+
provider: aws
|
|
91
|
+
resource_pattern: ec2/instance/*
|
|
92
|
+
actions:
|
|
93
|
+
- delete
|
|
94
|
+
scope:
|
|
95
|
+
region: us-east-1
|
|
96
|
+
time_window: null
|
|
97
|
+
effect: BLOCK
|
|
98
|
+
constraint_class: deletion
|
|
99
|
+
principal: admin
|
|
100
|
+
source_ref: jira-2001
|
|
101
|
+
source_timestamp: '2026-03-10T09:00:00+00:00'
|
|
102
|
+
rule_text: Block deleting EC2 instances in us-east-1; terminate through the runbook
|
|
103
|
+
instead.
|
|
104
|
+
provenance_hash: b7e90e442b18df6b94af766bc3b881bf4a4c50341a1df770ab004b024fb6c5a1
|
|
105
|
+
- id: azure-escalate-aks-scale-delete
|
|
106
|
+
provider: azure
|
|
107
|
+
resource_pattern: aks/cluster/*
|
|
108
|
+
actions:
|
|
109
|
+
- delete
|
|
110
|
+
- scale
|
|
111
|
+
scope: {}
|
|
112
|
+
time_window: null
|
|
113
|
+
effect: ESCALATE
|
|
114
|
+
constraint_class: scaling
|
|
115
|
+
principal: sre_lead
|
|
116
|
+
source_ref: git-def456
|
|
117
|
+
source_timestamp: '2026-03-12T11:00:00+00:00'
|
|
118
|
+
rule_text: Escalate scaling or deleting AKS clusters for human review.
|
|
119
|
+
provenance_hash: 8281e310fb3d5cc7b4a4041de2e8c62cc97e93eacb00f74e416f8fc9625acf6a
|
|
120
|
+
- id: gcp-no-delete-sql-instance
|
|
121
|
+
provider: gcp
|
|
122
|
+
resource_pattern: sql/instance/*
|
|
123
|
+
actions:
|
|
124
|
+
- delete
|
|
125
|
+
scope: {}
|
|
126
|
+
time_window: null
|
|
127
|
+
effect: BLOCK
|
|
128
|
+
constraint_class: deletion
|
|
129
|
+
principal: admin
|
|
130
|
+
source_ref: jira-2002
|
|
131
|
+
source_timestamp: '2026-03-14T13:00:00+00:00'
|
|
132
|
+
rule_text: Block deleting Cloud SQL instances directly; use the decommission runbook
|
|
133
|
+
instead.
|
|
134
|
+
provenance_hash: 597d1cc37a6e19d8508ede3c762ad2be3afb384a50a603c2df34d263712cfd7b
|
|
135
|
+
- id: no-delete-in-prod-env
|
|
136
|
+
provider: kubernetes
|
|
137
|
+
resource_pattern: '*'
|
|
138
|
+
actions:
|
|
139
|
+
- delete
|
|
140
|
+
scope:
|
|
141
|
+
env: prod
|
|
142
|
+
time_window: null
|
|
143
|
+
effect: BLOCK
|
|
144
|
+
constraint_class: deletion
|
|
145
|
+
principal: admin
|
|
146
|
+
source_ref: git-789abc
|
|
147
|
+
source_timestamp: '2026-03-18T10:00:00+00:00'
|
|
148
|
+
rule_text: Block deleting any resource in a production environment, regardless of
|
|
149
|
+
kind; only the runbook may delete in prod.
|
|
150
|
+
provenance_hash: 4c9c7f43f3d7e404ce0f9d4fc50cae305473aae9ee176f99028096754e042c72
|
|
151
|
+
- id: no-delete-in-prod-namespace
|
|
152
|
+
provider: kubernetes
|
|
153
|
+
resource_pattern: '*'
|
|
154
|
+
actions:
|
|
155
|
+
- delete
|
|
156
|
+
scope:
|
|
157
|
+
namespace: prod
|
|
158
|
+
time_window: null
|
|
159
|
+
effect: BLOCK
|
|
160
|
+
constraint_class: deletion
|
|
161
|
+
principal: admin
|
|
162
|
+
source_ref: jira-3004
|
|
163
|
+
source_timestamp: '2026-03-21T09:00:00+00:00'
|
|
164
|
+
rule_text: Block deleting any resource in the prod namespace (including deleting
|
|
165
|
+
the namespace itself, which cascades to everything in it); only the runbook may
|
|
166
|
+
delete in prod.
|
|
167
|
+
provenance_hash: f113e23d4a503ef45fbab68655f41d8cf434f1dbcf16f0fb646e5636bedb30e0
|
|
168
|
+
- id: helm-block-release-delete-prod
|
|
169
|
+
provider: helm
|
|
170
|
+
resource_pattern: release/*
|
|
171
|
+
actions:
|
|
172
|
+
- delete
|
|
173
|
+
scope:
|
|
174
|
+
namespace: prod
|
|
175
|
+
time_window: null
|
|
176
|
+
effect: BLOCK
|
|
177
|
+
constraint_class: deletion
|
|
178
|
+
principal: admin
|
|
179
|
+
source_ref: jira-3001
|
|
180
|
+
source_timestamp: '2026-03-20T09:00:00+00:00'
|
|
181
|
+
rule_text: Block deleting Helm releases in the prod namespace; use the decommission
|
|
182
|
+
runbook instead.
|
|
183
|
+
provenance_hash: 95a7e5c38de10083ba86e99ac6b75d9e18bfbf148710e6a037bdc7c438b84bf7
|
|
184
|
+
- id: argocd-escalate-prod-sync-prune
|
|
185
|
+
provider: argocd
|
|
186
|
+
resource_pattern: app/prod-*
|
|
187
|
+
actions:
|
|
188
|
+
- sync
|
|
189
|
+
scope:
|
|
190
|
+
prune: true
|
|
191
|
+
time_window: null
|
|
192
|
+
effect: ESCALATE
|
|
193
|
+
constraint_class: configuration
|
|
194
|
+
principal: sre_lead
|
|
195
|
+
source_ref: jira-3003
|
|
196
|
+
source_timestamp: '2026-03-20T09:30:00+00:00'
|
|
197
|
+
rule_text: Escalate ArgoCD syncs of prod applications with --prune for human review.
|
|
198
|
+
provenance_hash: d2f69433e0f103545173689e92f40ef40e29ad8fb35b55eea735775b7fd880d0
|
|
199
|
+
- id: git-block-force-push-main
|
|
200
|
+
provider: git
|
|
201
|
+
resource_pattern: ref/main
|
|
202
|
+
actions:
|
|
203
|
+
- push
|
|
204
|
+
scope:
|
|
205
|
+
force: true
|
|
206
|
+
time_window: null
|
|
207
|
+
effect: BLOCK
|
|
208
|
+
constraint_class: configuration
|
|
209
|
+
principal: sre_lead
|
|
210
|
+
source_ref: git-4001
|
|
211
|
+
source_timestamp: '2026-03-20T10:00:00+00:00'
|
|
212
|
+
rule_text: Block force-pushing to main; history rewrites on the shared branch are
|
|
213
|
+
never allowed.
|
|
214
|
+
provenance_hash: cc77094b73548458a4d8bade2ed7ac1c300ee196345f82b2c88a4d98f867f4f7
|
|
215
|
+
- id: github-escalate-deploy-prod-workflow
|
|
216
|
+
provider: github
|
|
217
|
+
resource_pattern: workflow/deploy-prod*
|
|
218
|
+
actions:
|
|
219
|
+
- run
|
|
220
|
+
scope: {}
|
|
221
|
+
time_window: null
|
|
222
|
+
effect: ESCALATE
|
|
223
|
+
constraint_class: configuration
|
|
224
|
+
principal: sre_lead
|
|
225
|
+
source_ref: jira-3002
|
|
226
|
+
source_timestamp: '2026-03-20T10:30:00+00:00'
|
|
227
|
+
rule_text: Escalate manual runs of production deploy workflows for human review.
|
|
228
|
+
provenance_hash: c87ecc926787c75fcc985db7048d28b5e4c50da424507b87c438f4b459ded138
|
|
229
|
+
- id: sql-block-unbounded-table-delete
|
|
230
|
+
provider: sql
|
|
231
|
+
resource_pattern: table/*
|
|
232
|
+
actions:
|
|
233
|
+
- delete
|
|
234
|
+
scope:
|
|
235
|
+
unbounded: true
|
|
236
|
+
time_window: null
|
|
237
|
+
effect: BLOCK
|
|
238
|
+
constraint_class: deletion
|
|
239
|
+
principal: admin
|
|
240
|
+
source_ref: jira-5001
|
|
241
|
+
source_timestamp: '2026-04-01T09:00:00+00:00'
|
|
242
|
+
rule_text: Block unbounded DELETE statements against any table (a DELETE with no
|
|
243
|
+
WHERE clause).
|
|
244
|
+
provenance_hash: b2304cd54c4f67fddd275587f98b5406b5af5afa58428227c37fddcf61be69bb
|
|
245
|
+
- id: sql-block-database-delete
|
|
246
|
+
provider: sql
|
|
247
|
+
resource_pattern: database/*
|
|
248
|
+
actions:
|
|
249
|
+
- delete
|
|
250
|
+
scope: {}
|
|
251
|
+
time_window: null
|
|
252
|
+
effect: BLOCK
|
|
253
|
+
constraint_class: deletion
|
|
254
|
+
principal: admin
|
|
255
|
+
source_ref: jira-5002
|
|
256
|
+
source_timestamp: '2026-04-01T09:05:00+00:00'
|
|
257
|
+
rule_text: Block DROP DATABASE / DROP SCHEMA statements outright.
|
|
258
|
+
provenance_hash: 3498aef6f346c9f3ea59f8971a329fe362e6da153bf31d9cf9acf515061a8ca3
|
|
259
|
+
- id: sql-escalate-table-ddl-drop-column
|
|
260
|
+
provider: sql
|
|
261
|
+
resource_pattern: table/*
|
|
262
|
+
actions:
|
|
263
|
+
- update
|
|
264
|
+
scope:
|
|
265
|
+
ddl: true
|
|
266
|
+
drop_column: true
|
|
267
|
+
time_window: null
|
|
268
|
+
effect: ESCALATE
|
|
269
|
+
constraint_class: configuration
|
|
270
|
+
principal: sre_lead
|
|
271
|
+
source_ref: jira-5003
|
|
272
|
+
source_timestamp: '2026-04-01T09:10:00+00:00'
|
|
273
|
+
rule_text: Escalate ALTER TABLE ... DROP COLUMN statements for human review before
|
|
274
|
+
they run.
|
|
275
|
+
provenance_hash: 79d35ee558eff46c3c80110dd492d066b1365030930885a4b5b6e91de839363f
|
|
276
|
+
- id: mongodb-block-unbounded-collection-delete
|
|
277
|
+
provider: mongodb
|
|
278
|
+
resource_pattern: collection/*
|
|
279
|
+
actions:
|
|
280
|
+
- delete
|
|
281
|
+
scope:
|
|
282
|
+
unbounded: true
|
|
283
|
+
time_window: null
|
|
284
|
+
effect: BLOCK
|
|
285
|
+
constraint_class: deletion
|
|
286
|
+
principal: admin
|
|
287
|
+
source_ref: jira-5004
|
|
288
|
+
source_timestamp: '2026-04-01T09:15:00+00:00'
|
|
289
|
+
rule_text: Block unbounded deleteMany/remove calls against any Mongo collection
|
|
290
|
+
(an empty filter matches everything).
|
|
291
|
+
provenance_hash: bfcd815f7a5d20cb3449cf469faa903c73e07a804f42def4749e8d1ba19cb7cb
|
|
292
|
+
- id: pulumi-escalate-rds-delete-replace
|
|
293
|
+
provider: pulumi
|
|
294
|
+
resource_pattern: aws/rds/*
|
|
295
|
+
actions:
|
|
296
|
+
- delete
|
|
297
|
+
- replace
|
|
298
|
+
scope: {}
|
|
299
|
+
time_window: null
|
|
300
|
+
effect: ESCALATE
|
|
301
|
+
constraint_class: deletion
|
|
302
|
+
principal: admin
|
|
303
|
+
source_ref: plan-5005
|
|
304
|
+
source_timestamp: '2026-04-01T09:20:00+00:00'
|
|
305
|
+
rule_text: Escalate any Pulumi delete or replace of an RDS resource for human review
|
|
306
|
+
before applying.
|
|
307
|
+
provenance_hash: d36290c432cb1f37323361b5d19a34e00a5e6ef588f566b9f4ccad23f0d72b4b
|
|
308
|
+
- id: migration-block-database-delete
|
|
309
|
+
provider: migration
|
|
310
|
+
resource_pattern: database/*
|
|
311
|
+
actions:
|
|
312
|
+
- delete
|
|
313
|
+
scope: {}
|
|
314
|
+
time_window: null
|
|
315
|
+
effect: BLOCK
|
|
316
|
+
constraint_class: deletion
|
|
317
|
+
principal: admin
|
|
318
|
+
source_ref: jira-5006
|
|
319
|
+
source_timestamp: '2026-04-01T09:25:00+00:00'
|
|
320
|
+
rule_text: Block database-wiping migration commands (flyway clean, rails db:drop/db:reset,
|
|
321
|
+
prisma migrate reset) outright.
|
|
322
|
+
provenance_hash: ebddf9666f7df5ce6ccd0a4cd9b1de5ae67cbbe12477b2559701aa0bf83cda2e
|
|
323
|
+
- id: helm-block-release-delete-prod-env
|
|
324
|
+
provider: helm
|
|
325
|
+
resource_pattern: release/*
|
|
326
|
+
actions:
|
|
327
|
+
- delete
|
|
328
|
+
scope:
|
|
329
|
+
env: prod
|
|
330
|
+
time_window: null
|
|
331
|
+
effect: BLOCK
|
|
332
|
+
constraint_class: deletion
|
|
333
|
+
principal: admin
|
|
334
|
+
source_ref: jira-3005
|
|
335
|
+
source_timestamp: '2026-03-20T09:15:00+00:00'
|
|
336
|
+
rule_text: Block deleting Helm releases in any production environment (resolved
|
|
337
|
+
from the kube context), whatever the namespace; use the decommission runbook instead.
|
|
338
|
+
provenance_hash: 747653b3b34300a18e4773a0784706fcb0147fb10507e88ce93f2fb5cdcd4df8
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Maps provider-specific identifiers (kube context/cluster, AWS account/
|
|
2
|
+
# profile, GCP project, Azure subscription/resource group) to a normalised
|
|
3
|
+
# env: prod | staging | dev. Loaded via aegis_core.environments.load_environment_map(path).
|
|
4
|
+
#
|
|
5
|
+
# Fail-safe: an identifier that isn't listed here resolves to no env at all
|
|
6
|
+
# (never a default like "dev") -- see aegis_core/environments.py.
|
|
7
|
+
environments:
|
|
8
|
+
kubernetes:
|
|
9
|
+
contexts:
|
|
10
|
+
prod-us-east: prod
|
|
11
|
+
staging: staging
|
|
12
|
+
kind-local: dev
|
|
13
|
+
clusters:
|
|
14
|
+
gke_acme_us-east1_prod: prod
|
|
15
|
+
# KUBECONFIG=/path kubectl ... / helm --kubeconfig: the file path itself
|
|
16
|
+
# names the cluster when no --context is given.
|
|
17
|
+
kubeconfigs:
|
|
18
|
+
/etc/kubernetes/prod.kubeconfig: prod
|
|
19
|
+
~/.kube/staging.config: staging
|
|
20
|
+
aws:
|
|
21
|
+
accounts:
|
|
22
|
+
"123456789012": prod
|
|
23
|
+
"210987654321": staging
|
|
24
|
+
profiles:
|
|
25
|
+
prod-admin: prod
|
|
26
|
+
staging: staging
|
|
27
|
+
gcp:
|
|
28
|
+
projects:
|
|
29
|
+
acme-prod: prod
|
|
30
|
+
acme-staging: staging
|
|
31
|
+
azure:
|
|
32
|
+
subscriptions:
|
|
33
|
+
"11111111-1111-1111-1111-111111111111": prod
|
|
34
|
+
resource_groups:
|
|
35
|
+
rg-prod: prod
|
|
36
|
+
rg1: staging
|
|
37
|
+
github:
|
|
38
|
+
# gh -R/--repo owner/repo (or a repo URL in the argv).
|
|
39
|
+
repos:
|
|
40
|
+
acme/shop: prod
|
|
41
|
+
acme/shop-staging: staging
|
|
42
|
+
argocd:
|
|
43
|
+
# Globs on the ArgoCD application name; first match wins.
|
|
44
|
+
apps:
|
|
45
|
+
"prod-*": prod
|
|
46
|
+
"staging-*": staging
|
|
47
|
+
terraform:
|
|
48
|
+
# terraform/tofu workspace (metadata.workspace) when a plan carries one.
|
|
49
|
+
workspaces:
|
|
50
|
+
prod: prod
|
|
51
|
+
staging: staging
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# EXAMPLE SIGNING KEY -- PUBLIC, FOR DEMOS AND TESTS ONLY.
|
|
2
|
+
# This key is committed to the repository so that the shipped example and
|
|
3
|
+
# corpus files carry verifiable .sig files out of the box. Anyone with it
|
|
4
|
+
# can forge policy files; generate your own for real use, e.g.
|
|
5
|
+
# python -c 'import secrets; print(secrets.token_hex(32))' > aegis-signing.key
|
|
6
|
+
# and load it with --key file:aegis-signing.key or --key env:AEGIS_SIGNING_KEY.
|
|
7
|
+
a3e15c0f9b7d42e6c8a1f04d7b2e9c5361d8f0a4b7c2e5d19f3a6c8e0b4d7f21
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
plan_constraints:
|
|
2
|
+
- id: plan-max-25-resources
|
|
3
|
+
provider: terraform
|
|
4
|
+
effect: ESCALATE
|
|
5
|
+
constraint_class: configuration
|
|
6
|
+
principal: sre_lead
|
|
7
|
+
source_ref: plan-1001
|
|
8
|
+
source_timestamp: '2026-04-01T09:00:00+00:00'
|
|
9
|
+
rule_text: Escalate any terraform plan that touches more than 25 resources for human
|
|
10
|
+
review.
|
|
11
|
+
provenance_hash: 31660a4ae4fc93b4afb3e45637829282dfe77f777d0fff4cbabef37c08adb038
|
|
12
|
+
max_intents: 25
|
|
13
|
+
max_matching: null
|
|
14
|
+
requires_all: null
|
|
15
|
+
forbid_together: null
|
|
16
|
+
ratio: null
|
|
17
|
+
- id: plan-no-db-deletes
|
|
18
|
+
provider: terraform
|
|
19
|
+
effect: BLOCK
|
|
20
|
+
constraint_class: deletion
|
|
21
|
+
principal: admin
|
|
22
|
+
source_ref: plan-1002
|
|
23
|
+
source_timestamp: '2026-04-02T09:00:00+00:00'
|
|
24
|
+
rule_text: Block any terraform plan that deletes or replaces an aws_db_instance.
|
|
25
|
+
provenance_hash: 72c17fbb6eaab0de412a42a0bdefa0db28985c5f6c1f197770124744d28cfe09
|
|
26
|
+
max_intents: null
|
|
27
|
+
max_matching:
|
|
28
|
+
actions:
|
|
29
|
+
- delete
|
|
30
|
+
- replace
|
|
31
|
+
resource_pattern: aws_db_instance.*
|
|
32
|
+
max: 0
|
|
33
|
+
requires_all: null
|
|
34
|
+
forbid_together: null
|
|
35
|
+
ratio: null
|
|
36
|
+
- id: plan-no-delete-and-create-us-east-1
|
|
37
|
+
provider: terraform
|
|
38
|
+
effect: BLOCK
|
|
39
|
+
constraint_class: deletion
|
|
40
|
+
principal: admin
|
|
41
|
+
source_ref: plan-1003
|
|
42
|
+
source_timestamp: '2026-04-03T09:00:00+00:00'
|
|
43
|
+
rule_text: Block a terraform plan that both deletes resources in us-east-1 and creates
|
|
44
|
+
resources anywhere; split the change into separate plans for review.
|
|
45
|
+
provenance_hash: cbdaa3e708a9d43ed70c3fde4c0825dd1bd0797ad3bebddf0175d05a3a5cc469
|
|
46
|
+
max_intents: null
|
|
47
|
+
max_matching: null
|
|
48
|
+
requires_all: null
|
|
49
|
+
forbid_together:
|
|
50
|
+
- actions:
|
|
51
|
+
- delete
|
|
52
|
+
scope:
|
|
53
|
+
region: us-east-1
|
|
54
|
+
- actions:
|
|
55
|
+
- create
|
|
56
|
+
ratio: null
|
|
57
|
+
- id: plan-k8s-delete-ratio
|
|
58
|
+
provider: kubernetes
|
|
59
|
+
effect: ESCALATE
|
|
60
|
+
constraint_class: deletion
|
|
61
|
+
principal: admin
|
|
62
|
+
source_ref: plan-1004
|
|
63
|
+
source_timestamp: '2026-04-04T09:00:00+00:00'
|
|
64
|
+
rule_text: Escalate a kubectl batch where more than 50% of the touched resources
|
|
65
|
+
are deletes.
|
|
66
|
+
provenance_hash: f40ffe666136e66ac2cda71601c5658705c70254ea8ac5730f9bdcc8d30be6b4
|
|
67
|
+
max_intents: null
|
|
68
|
+
max_matching: null
|
|
69
|
+
requires_all: null
|
|
70
|
+
forbid_together: null
|
|
71
|
+
ratio:
|
|
72
|
+
numerator:
|
|
73
|
+
actions:
|
|
74
|
+
- delete
|
|
75
|
+
denominator: {}
|
|
76
|
+
max: 0.5
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"files": {
|
|
3
|
+
"PRINCIPALS.yaml": "bdc9ca4ae562397b203242031e960dc4a45eae1bf1ba6d8951f7e17d819a7cfb",
|
|
4
|
+
"git-4001.json": "8be2dd6c37ef643b3bc375b15d5d97889b00456285f594e21a3b4d52521e21de",
|
|
5
|
+
"git-789abc.json": "48ac500e13d36240ec5c72bf90e96b433a5873d636e9e36f99a73468e7fb5757",
|
|
6
|
+
"git-abc123.json": "ee3751fdcd64cf1dd374bf9f7b73cda723a4aced5053f32501ba9416de89afc7",
|
|
7
|
+
"git-bcd234.json": "a0de7b32bde75735c91504aa7156e7b2ba2ef961d0f439218507e40d0bdfd89a",
|
|
8
|
+
"git-def456.json": "9eba0bcbfa846766105d356b8877b390075c8bc63f65001a1a84878e1d2d96c3",
|
|
9
|
+
"jira-1001.json": "1f8833bada64c439b5b7f72af648e76ee1c0a726a1d03e02f6599c4c17d2225b",
|
|
10
|
+
"jira-1002.json": "ba428e864c6fe9aa3b25d8d8ca571ede0d2310888176668f9b3773b10dd31bca",
|
|
11
|
+
"jira-2001.json": "5467531afcee96f69ed6bf3174f62f82257e6e9766a581dc5f78d9cb310e1c59",
|
|
12
|
+
"jira-2002.json": "3492f1392a7e1518c051cec0b7b82c705ca90a96fbe24b1e99521f315ced7549",
|
|
13
|
+
"jira-3001.json": "08689e36a0cdb1c2a06e9c7acf415e323496072ad3834bf90e51c9af29ecf32a",
|
|
14
|
+
"jira-3002.json": "d5ba7481c7e300f116521a353989b4a409d1724ddd6566b0445df1adbae3d134",
|
|
15
|
+
"jira-3003.json": "71055681855c044920f5b4e24e653036780ccf73429d0e62d2f8fab45d42374e",
|
|
16
|
+
"jira-3004.json": "048b4f4e81680b15a4c5131835def7ff9dc96192554feb63d0ff264a6a36bea8",
|
|
17
|
+
"jira-3005.json": "9f712aed2dce329b55b8f4e558d52d5bdc84e02f3ed4ffb41cfef49c15ab245b",
|
|
18
|
+
"jira-5001.json": "02e13622d4e8819dd056128ad46c0e1b83d222a266281b7f298e02b43541d6f7",
|
|
19
|
+
"jira-5002.json": "dbcca55b9fe3196b16e4d49bff81faaf454499cf240cdfb480a109866c198d85",
|
|
20
|
+
"jira-5003.json": "f79c11b4d9f06b56dad96904a2fc44c49169366ed80ba12b2b87eba74eeb8895",
|
|
21
|
+
"jira-5004.json": "30a8d2654cd78031bea9ce26f5ddd7b4e8997c340820b1e49a470a2b83529a9a",
|
|
22
|
+
"jira-5006.json": "623a0de2fd94895777f2b6e67aef05901b79efb047fdbbd6e69cde1111644df7",
|
|
23
|
+
"plan-1001.json": "c412f6a2bb62c70129e001efec3d675b895ac0c39ddf77dcfb0b76341d5a84dc",
|
|
24
|
+
"plan-1002.json": "2d6b7e10be1c25aae3689713c9904b0033c90df691a9dec3bf9c9a2372ac2c5c",
|
|
25
|
+
"plan-1003.json": "bbbb5aeb11d133dc9a583b737b6ea3448510eb2888677019f4f6d304309249b9",
|
|
26
|
+
"plan-1004.json": "d8b2f30f9e400a395a6d2fb1ebbcc07cc60a5b994083f7cb8b18b4a19182e47e",
|
|
27
|
+
"plan-5005.json": "2d706c56fb48b215284a7faed521f13dcf956b8742fee3912b1d843d72eae4e4",
|
|
28
|
+
"slack-perma-1.json": "2c8945a68e413c300ef58fc6a6d3daa8e4d0029a26a454dfad983e2091a188d1"
|
|
29
|
+
},
|
|
30
|
+
"header": "aegis-manifest-v1",
|
|
31
|
+
"sig": "16b0f5f348626c74d6b40cfe21fe92d3e37703668fa51e9428fdc026cc297bc0"
|
|
32
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Transport-level attribution for the source snapshots in this directory
|
|
2
|
+
# (REVIEW-4 T1.1): which principal each source_ref is attributed to by the
|
|
3
|
+
# transport (repo owner, ticket author, Slack user), independently of the
|
|
4
|
+
# self-asserted `principal` inside the payload. Signed like every other
|
|
5
|
+
# policy file; loaded by aegis_core.provenance.FileSourceFetcher.
|
|
6
|
+
principals:
|
|
7
|
+
git-4001: sre_lead
|
|
8
|
+
git-789abc: admin
|
|
9
|
+
git-abc123: admin
|
|
10
|
+
git-bcd234: admin
|
|
11
|
+
git-def456: sre_lead
|
|
12
|
+
jira-1001: sre_lead
|
|
13
|
+
jira-1002: developer
|
|
14
|
+
jira-2001: admin
|
|
15
|
+
jira-2002: admin
|
|
16
|
+
jira-3001: admin
|
|
17
|
+
jira-3002: sre_lead
|
|
18
|
+
jira-3003: sre_lead
|
|
19
|
+
jira-3004: admin
|
|
20
|
+
jira-3005: admin
|
|
21
|
+
jira-5001: admin
|
|
22
|
+
jira-5002: admin
|
|
23
|
+
jira-5003: sre_lead
|
|
24
|
+
jira-5004: admin
|
|
25
|
+
jira-5006: admin
|
|
26
|
+
plan-1001: sre_lead
|
|
27
|
+
plan-1002: admin
|
|
28
|
+
plan-1003: admin
|
|
29
|
+
plan-1004: admin
|
|
30
|
+
plan-5005: admin
|
|
31
|
+
slack-perma-1: admin
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"provider": "git",
|
|
3
|
+
"resource_pattern": "ref/main",
|
|
4
|
+
"actions": [
|
|
5
|
+
"push"
|
|
6
|
+
],
|
|
7
|
+
"scope": {
|
|
8
|
+
"force": true
|
|
9
|
+
},
|
|
10
|
+
"time_window": null,
|
|
11
|
+
"effect": "BLOCK",
|
|
12
|
+
"constraint_class": "configuration",
|
|
13
|
+
"principal": "sre_lead",
|
|
14
|
+
"source_ref": "git-4001",
|
|
15
|
+
"source_timestamp": "2026-03-20T10:00:00+00:00",
|
|
16
|
+
"rule_text": "Block force-pushing to main; history rewrites on the shared branch are never allowed."
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"provider": "kubernetes",
|
|
3
|
+
"resource_pattern": "*",
|
|
4
|
+
"actions": [
|
|
5
|
+
"delete"
|
|
6
|
+
],
|
|
7
|
+
"scope": {
|
|
8
|
+
"env": "prod"
|
|
9
|
+
},
|
|
10
|
+
"time_window": null,
|
|
11
|
+
"effect": "BLOCK",
|
|
12
|
+
"constraint_class": "deletion",
|
|
13
|
+
"principal": "admin",
|
|
14
|
+
"source_ref": "git-789abc",
|
|
15
|
+
"source_timestamp": "2026-03-18T10:00:00+00:00",
|
|
16
|
+
"rule_text": "Block deleting any resource in a production environment, regardless of kind; only the runbook may delete in prod."
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"provider": "kubernetes",
|
|
3
|
+
"resource_pattern": "node/*",
|
|
4
|
+
"actions": [
|
|
5
|
+
"delete"
|
|
6
|
+
],
|
|
7
|
+
"scope": {},
|
|
8
|
+
"time_window": null,
|
|
9
|
+
"effect": "BLOCK",
|
|
10
|
+
"constraint_class": "deletion",
|
|
11
|
+
"principal": "admin",
|
|
12
|
+
"source_ref": "git-abc123",
|
|
13
|
+
"source_timestamp": "2026-02-01T12:00:00+00:00",
|
|
14
|
+
"rule_text": "Never delete cluster nodes directly; drain and cordon through the runbook instead."
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"provider": "terraform",
|
|
3
|
+
"resource_pattern": "aws_autoscaling_group.*",
|
|
4
|
+
"actions": [
|
|
5
|
+
"update"
|
|
6
|
+
],
|
|
7
|
+
"scope": {},
|
|
8
|
+
"time_window": null,
|
|
9
|
+
"effect": "BLOCK",
|
|
10
|
+
"constraint_class": "scaling",
|
|
11
|
+
"principal": "admin",
|
|
12
|
+
"source_ref": "git-bcd234",
|
|
13
|
+
"source_timestamp": "2026-03-05T14:00:00+00:00",
|
|
14
|
+
"rule_text": "Block direct terraform changes to autoscaling groups; use the scaling API instead."
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"provider": "azure",
|
|
3
|
+
"resource_pattern": "aks/cluster/*",
|
|
4
|
+
"actions": [
|
|
5
|
+
"delete",
|
|
6
|
+
"scale"
|
|
7
|
+
],
|
|
8
|
+
"scope": {},
|
|
9
|
+
"time_window": null,
|
|
10
|
+
"effect": "ESCALATE",
|
|
11
|
+
"constraint_class": "scaling",
|
|
12
|
+
"principal": "sre_lead",
|
|
13
|
+
"source_ref": "git-def456",
|
|
14
|
+
"source_timestamp": "2026-03-12T11:00:00+00:00",
|
|
15
|
+
"rule_text": "Escalate scaling or deleting AKS clusters for human review."
|
|
16
|
+
}
|