refactor(scenarios): split monolithic configuration into individual files
- Split `scenarios/scenarios.json` into individual JSON files under `scenarios/data/` named `<scenario-id>.json` - Split `scenarios/bundles.json` into individual JSON files under `scenarios/bundles/` named `<bundle-id>.json` - Updated `backend/server.js` to dynamically load scenario and bundle files from their respective directories - Updated documentation in `scenarios/SCHEMA.md` and `README.md` to reflect the new repository layout and contributor workflow Signed-off-by: Abhinav Sinha <[email protected]>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"id": "cks-apparmor-profile",
|
||||
"title": "AppArmor Profiles",
|
||||
"category": "Workload Security",
|
||||
"difficulty": "Hard",
|
||||
"type": "task",
|
||||
"weight": 5,
|
||||
"description": "## AppArmor Profiles\n\nAppArmor is a Linux kernel security module that restricts programs' capabilities. In Kubernetes 1.30+, it is supported natively in the securityContext.\n\n**Your task:**\n\nCreate a Pod named `apparmor-pod` using the `nginx:alpine` image. Configure its Pod-level `securityContext` to use the `RuntimeDefault` AppArmor profile.\n\n```bash\n# Verify the profile is set:\nkubectl get pod apparmor-pod -o yaml | grep appArmor\n```",
|
||||
"hints": [
|
||||
{
|
||||
"title": "Set AppArmor Profile",
|
||||
"body": "Add `appArmorProfile: { type: RuntimeDefault }` under `spec.securityContext`.",
|
||||
"command": "cat <<EOF | kubectl apply -f -\napiVersion: v1\nkind: Pod\nmetadata:\n name: apparmor-pod\nspec:\n securityContext:\n appArmorProfile:\n type: RuntimeDefault\n containers:\n - name: app\n image: nginx:alpine\nEOF"
|
||||
}
|
||||
],
|
||||
"setup_commands": [],
|
||||
"validation": {
|
||||
"commands": [
|
||||
{
|
||||
"description": "appArmorProfile type is RuntimeDefault",
|
||||
"command": "kubectl get pod apparmor-pod -o jsonpath='{.spec.securityContext.appArmorProfile.type}'",
|
||||
"expected_output": "RuntimeDefault",
|
||||
"match": "exact"
|
||||
}
|
||||
]
|
||||
},
|
||||
"default_namespace": "default",
|
||||
"teardown_commands": [
|
||||
{
|
||||
"command": "kubectl delete pod apparmor-pod --ignore-not-found --grace-period=0 --force"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user