cloak2stix is a small exporter that clones the upstream CLOAK repository, reads concealment-data.json through git history, and writes a STIX 2.1 bundle.
Install the required dependencies using:
# clone the latest code
git clone https://github.com/muchdogesec/cloak2stix
cd cloak2stix
# create a venv
python3 -m venv cloak2stix-venv
source cloak2stix-venv/bin/activate
# install requirements
pip3 install -r requirements.txtThe current entrypoint is:
python run_cloak2stix.pyThat is the only run command in the repo today. There are no CLI flags or subcommands.
There are no user-supplied options yet, so the behavior is controlled by fixed values in the code:
run_cloak2stix.pyis the launcher and immediately callscloak2stix.main.main().REPO_URLpoints at the upstream CLOAK GitHub repository that gets cloned or pulled.outputs/is the working directory created in the current repo root.outputs/cloakis where the CLOAK repository is stored locally.outputs/bundleis where the generated STIX bundle is written.cloak-bundle-v<yy.mm.dd>.jsonis the output filename format.- The bundle version suffix comes from the commit date of the last processed CLOAK commit.
- The UUID namespace in
cloak2stix/main.pyis used to make generated IDs deterministic. - The three raw GitHub URLs in
fetch_external_objects()are support objects added to the bundle before generated CLOAK content.
The exporter currently follows this flow:
- Create
outputs/if it does not exist. - Load three external STIX objects from fixed URLs.
- Clone or update the upstream CLOAK repository into
outputs/cloak. - Walk the git history for
concealment-data.jsonfrom oldest commit to newest. - Track when each object first appears and last changes.
- Recursively build tactics, techniques, sub-techniques, procedures, and relationships.
- Write a single STIX bundle to
outputs/bundle/cloak-bundle-v<version>.json.
cloak2stix/main.py now imports cleanly again, so python run_cloak2stix.py can execute the exporter path described above.
The generated bundle includes:
- fetched support objects
- a matrix object with all tactic refs
- tactic objects
- technique objects
- sub-technique objects
- procedure objects
subtechnique-ofrelationshipsusesrelationships from techniques to proceduresx_mitre_domains = ["CLOAK"]on generated and fetched STIX objects
It does not currently build a collection object or Navigator-specific export split.