hsa-infrastructure
Skill0 starsChanged 5 months agoMITView on GitHub
Use when authoring, reviewing, or auditing infrastructure in the High Security Area (HSA) — card personalization zone under PCI Card Production + PIN scope. Covers air-gap constraints, dual-control requirements, local-only inference, and HSA-specific Ansible/GitLab patterns.
In this repository24 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ansible-patternsSkill
- ansible-testingSkill
- change-documentationSkill
- ci-pipeline-debuggingSkill
- drift-detectionSkill
- gitlab-cicd-pipelineSkill
- iac-sast-scanningSkill
- iac-tooling-selectionSkill
- incident-responseSkill
- instinct-promotionSkill
- instinct-rollbackSkill
- knowledge-curationSkill
- multi-env-promotionSkill
- octopus-releaseSkill
- pci-cp-complianceSkill
- pci-dss-complianceSkill
- pci-pin-awarenessSkill
- perso-change-controlSkill
- perso-complianceSkill
- pre-commit-and-secret-scanningSkill
- rollback-and-runbooksSkill
- secrets-vaultSkill
- supply-chain-and-sbomSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Never pulled from the internet on HSA hosts
- Very specific: line 35
Never add tasks that fetch packages, images, or updates directly from the internet.
- Very specific: line 36
Use ansible.builtin.copy to push pre-staged packages from a transfer share, not ansible.builtin.get_url pointing at a public mirror.
- Very specific: line 41
No cloud model may process HSA-adjacent content.
- Very specific: line 47
Every infrastructure change to an HSA host requires two distinct human approvers — not just the MR author.
- Distinctive: line 168
Every HSA playbook must have a corresponding rollback play.
- Very specific: line 175
Verify service state with ansible.builtin.assert
- Very specific: line 181
Use: node scripts/hooks/dual-control-promotion-gate.js --check --id <id> --zone hsa --approvers <a>,<b> --citation "<ref>" before …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
HSA Infrastructure Skill
When to Use
Load this skill for any task involving infrastructure in the High Security Area:
- Planning changes to personalization system infrastructure
- Reviewing Ansible playbooks or CI configs targeting HSA hosts
- Auditing HSA infrastructure state
- Writing change records for HSA zone changes
How It Works
This skill provides HSA-specific patterns, constraints, and examples that override or
extend the base ansible-patterns and gitlab-cicd-pipeline skills for the air-gapped
personalization zone. Load it alongside those skills; it takes precedence where rules
conflict.
Core Constraints (non-negotiable)
Air-gap
The HSA has no direct internet access. Every artifact (playbook, role, CI component, container image, package) must be:
- Authored and tested in the corporate zone
- Transferred via the approved air-gap process (signed artifact + hash verification)
- Never pulled from the internet on HSA hosts
Never add tasks that fetch packages, images, or updates directly from the internet.
Use ansible.builtin.copy to push pre-staged packages from a transfer share, not
ansible.builtin.get_url pointing at a public mirror.
Local inference only
No cloud model may process HSA-adjacent content. All analysis of HSA infrastructure
content must use the local Ollama lane (scripts/lib/ollama-router.js). The
INFRAOPS_SENSITIVE_FAIL_CLOSED=1 default enforces this at the hook boundary.
Dual control
Every infrastructure change to an HSA host requires two distinct human approvers —
not just the MR author. The dual-control-promotion-gate enforces this for instinct
promotion. MR-level enforcement requires the GitLab HSA project to have a minimum
approval count of 2 on protected branches. Verify this configuration is in place
before proposing any HSA MR.
No CHD in agent context
This agent operates on infrastructure metadata only — file paths, config schemas, playbook structure, runner topology. It never reads or reasons about actual PAN, SAD, PIN blocks, key components, or HSM configuration. If a file contains those values, identify it by path and route to the local lane.
Ansible Patterns for the HSA Zone
Package management (air-gapped)
# CORRECT — push from staged share, no internet
- name: Install perso-agent package
ansible.builtin.copy:
src: "{{ transfer_share }}/packages/perso-agent-{{ version }}.rpm"
dest: /tmp/perso-agent.rpm
mode: '0600'
owner: root
- name: Install from staged file
ansible.builtin.yum:
name: /tmp/perso-agent.rpm
state: present
# WRONG — never in HSA
- name: Install perso-agent
ansible.builtin.yum:
name: perso-agent
state: latest # fetches from internet — BLOCKED in HSAService management
# Always use FQCN; always verify state explicitly
- name: Ensure personalization service is running
ansible.builtin.systemd:
name: perso-engine
state: started
enabled: true
daemon_reload: true
register: svc_state
- name: Verify service is active
ansible.builtin.assert:
that: svc_state.status.ActiveState == 'active'
fail_msg: "perso-engine failed to start"Configuration management
# Use templated configs; never hardcode endpoint addresses
- name: Deploy perso-engine config
ansible.builtin.template:
src: templates/perso-engine.conf.j2
dest: /etc/perso-engine/engine.conf
owner: perso
group: perso
mode: '0640'
validate: /usr/bin/perso-engine --config-check %s
notify: Restart perso-engineGitLab CI/CD in the HSA Zone
HSA CI pipelines run on runners tagged hsa that are registered against the
air-gapped internal GitLab instance (gitlab-hsa.example.com), not the
corporate GitLab.
# .gitlab-ci.yml for HSA pipeline
stages:
- syntax
- check
- deploy # manual trigger only
variables:
ANSIBLE_FORCE_COLOR: "0"
ANSIBLE_HOST_KEY_CHECKING: "False"
syntax-check:
stage: syntax
tags: [hsa, ansible]
script:
- ansible-playbook --syntax-check site.yml
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
check-mode:
stage: check
tags: [hsa, ansible]
script:
- ansible-playbook --check --diff site.yml -i inventory/hsa/
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
deploy:
stage: deploy
tags: [hsa, deploy, ansible]
when: manual
environment:
name: hsa-production
url: https://gitlab-hsa.example.com
script:
- ansible-playbook site.yml -i inventory/hsa/
rules:
- if: $CI_COMMIT_BRANCH == "main"
needs:
- job: check-modeRollback in the HSA Zone
Every HSA playbook must have a corresponding rollback play. Because the zone is air-gapped, rollbacks cannot pull updated packages — they must revert to the previously staged artifact or revert configuration via git.
Standard rollback pattern:
- Re-run the previous version playbook with
--tags rollback - Verify service state with
ansible.builtin.assert - Log rollback to governance ledger via change record
Instinct Promotion for HSA
HSA zone instincts require dual-control-promotion-gate (two distinct approvers).
Use: node scripts/hooks/dual-control-promotion-gate.js --check --id <id> --zone hsa
--approvers <a>,<b> --citation "<ref>" before submitting to /instinct-promote.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

