Prepare Assignment 8 secure delivery and rollback
vpn-dns-gateway/pipeline/head This commit looks good
vpn-dns-gateway/pipeline/pr-main This commit looks good

Add the locked pricing service, trusted-agent pipeline, Ansible deployments, security gates, recovery runbooks, prerequisite evidence, and preparation manual.

Prepared with Codex assistance. Vincent explicitly authorized this local commit and will handle the push. Assessed releases and recovery exercises remain pending.
This commit is contained in:
2026-11-14 17:09:25 -05:00
parent 8beefde2a4
commit bf28adc7fb
51 changed files with 2091 additions and 14 deletions
+33
View File
@@ -0,0 +1,33 @@
import os
from flask import Flask, jsonify, request
app = Flask(__name__)
VERSION = "v1"
UNIT_PRICE = 10
COMMIT = os.environ.get("APP_COMMIT", "development")
def total_price(quantity):
if quantity < 1 or quantity > 1000:
raise ValueError("quantity must be between 1 and 1000")
return UNIT_PRICE * quantity
@app.get("/")
def index():
return jsonify(service="Startup Pricing", version=VERSION, commit=COMMIT)
@app.get("/health")
def health():
return jsonify(status="ok", version=VERSION)
@app.get("/price")
def price():
try:
quantity = int(request.args.get("quantity", "1"))
total = total_price(quantity)
except ValueError as error:
return jsonify(error=str(error)), 400
return jsonify(quantity=quantity, total=total, currency="USD")