forked from mtusi2026/mtusi2026lab7
Майорова Софья, БВТ2301, на 5. Трек1. HTTPS/TLS/ACL,18 API tests,13 pipeline groups,3 compromise runs,clean clone,persistence. Original tests/API contract preserved; residual CVE triage in REPORT/security.
17 lines
1.3 KiB
Python
17 lines
1.3 KiB
Python
"""Reconstruct prior lab6 broad-credential consequences in operator-controlled fixtures.
|
|
This is a capability baseline, not an attack against the real lab6 installation."""
|
|
import json
|
|
import uuid
|
|
from security_helpers import *
|
|
with db() as conn:
|
|
counts={t:conn.execute('SELECT count(*) AS n FROM '+t).fetchone()['n'] for t in ['users','sessions','messages']}
|
|
assert bus('operator').config_get('maxmemory')
|
|
key='staging/baseline-fixture-'+uuid.uuid4().hex
|
|
# Same worker S3 key, but the old trusted-network model has no role/prefix mTLS gate.
|
|
# Operator transport emulates that boundary explicitly; it is not a claim of privilege escalation.
|
|
client=s3('operator','worker')
|
|
client.put_object(Bucket='messenger-attachments',Key=key,Body=b'controlled-synthetic-baseline')
|
|
assert client.get_object(Bucket='messenger-attachments',Key=key)['Body'].read()==b'controlled-synthetic-baseline'
|
|
client.delete_object(Bucket='messenger-attachments',Key=key)
|
|
print(json.dumps({'model':'lab6-style shared full database role and bucket-wide worker S3 key; emulated by explicit operator fixture, NOT live lab6','business_table_row_counts_visible':counts,'bucket_wide_worker_key_can_write_and_delete_staging_without_identity_prefix_gate':True,'fixture_deleted':True,'modeled_broad_broker_CONFIG_allowed':True},indent=2))
|