{"id":32404769,"url":"https://github.com/bhanunamikaze/calectr","last_synced_at":"2026-02-21T23:03:20.186Z","repository":{"id":293886328,"uuid":"964459554","full_name":"Bhanunamikaze/Calectr","owner":"Bhanunamikaze","description":"Calectr is a command-line tool that converts adversary simulation logs from MITRE Caldera to VECTR-compatible assessment","archived":false,"fork":false,"pushed_at":"2025-04-11T08:51:20.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-25T11:03:58.970Z","etag":null,"topics":["caldera","caldera-plugin","vectr","vectr-plugin","vectr-tool"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bhanunamikaze.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-11T08:46:26.000Z","updated_at":"2025-04-11T08:53:34.000Z","dependencies_parsed_at":"2025-05-17T18:47:23.519Z","dependency_job_id":"f6c97b8e-2677-448e-be30-49a828318d7c","html_url":"https://github.com/Bhanunamikaze/Calectr","commit_stats":null,"previous_names":["bhanunamikaze/calectr"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Bhanunamikaze/Calectr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bhanunamikaze%2FCalectr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bhanunamikaze%2FCalectr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bhanunamikaze%2FCalectr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bhanunamikaze%2FCalectr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bhanunamikaze","download_url":"https://codeload.github.com/Bhanunamikaze/Calectr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bhanunamikaze%2FCalectr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29696868,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T18:18:25.093Z","status":"ssl_error","status_checked_at":"2026-02-21T18:18:22.435Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["caldera","caldera-plugin","vectr","vectr-plugin","vectr-tool"],"created_at":"2025-10-25T11:03:10.717Z","updated_at":"2026-02-21T23:03:20.148Z","avatar_url":"https://github.com/Bhanunamikaze.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Calectr — Caldera to VECTR Integration Tool\n\n**Calectr** is a command-line tool that converts adversary simulation logs from [MITRE Caldera](https://github.com/mitre/caldera) into VECTR-compatible assessments. It transforms Caldera JSON logs into enriched CSVs using MITRE ATT\u0026CK data and imports them into [VECTR](https://github.com/SecurityRiskAdvisors/VECTR) via the GraphQL API.\n\n\n##  What Can Calectr Do?\n\n-  **Parse Caldera JSON logs** and convert them into VECTR-formatted CSVs\n-  **Enrich MITRE techniques** with detection tips, URLs, and data sources\n-  **Automatically upload test cases** as assessments, campaigns, and test cases to VECTR\n-  Works with both **older and newer VECTR versions** (with or without Outcome Path support)\n-  Also supports direct import of **VECTR-formatted CSVs**\n\n\n##  Credits\n\n\u003e 💡 **Calectr is heavily inspired by the excellent work by [Security Risk Advisors](https://github.com/SecurityRiskAdvisors)** in their [`vectr-tools`](https://github.com/SecurityRiskAdvisors/vectr-tools) project.\n\nI’ve extended their work to:\n- Add Caldera-to-VECTR transformation\n- Automatically enrich data using MITRE CTI\n- Provide a seamless command-line workflow\n\n\n##  Requirements\n\n- Python 3.9+\n- A running instance of VECTR with API key access\n- Caldera JSON logs **or** VECTR-compatible CSVs\n- Internet access (to fetch latest MITRE ATT\u0026CK dataset)\n\n\n##  Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/Bhanunamikaze/Calectr.git\n   cd Calectr\n   ```\n\n2. Set up a virtual environment:\n   ```bash\n   python3 -m venv venv\n   source venv/bin/activate\n   ```\n\n3. Install dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n\n##  Configuration\n\n### 1. Create a VECTR API Key\n\n1. Log into your VECTR instance.\n2. Click your profile in the top-right corner → **API Keys**.\n3. Click **\"Create API Key\"**.\n4. Copy the **Client ID** and **Secret** — format them as:\n   ```\n   API_KEY=\"CLIENT_ID:SECRET\"\n   ```\n\n### 2. Create and configure your `.env` file\n\nCreate a `.env` file in the project root, and populate it like this:\n\n```env\nAPI_KEY=\"XPHN67C778OD5NGTARI0XW:cOUbbjVDgJ4av78JTeNUK3QVAVsKbau4lsXdISHqom4=\"\nVECTR_GQL_URL=\"https://vectr.internal/sra-purpletools-rest/graphql\"\nTARGET_DB=\"MY_USER_DB\"\nORG_NAME=\"Security Risk Advisors\"\n```\n\n##  How to Export Caldera JSON Logs\n\n1. **Login to your Caldera server**\n2. Go to the **Operations** tab\n3. Click on the operation you want to export\n4. Click **Download Report** (top right corner)\n5. In the dialog:\n   - ✅ Check **\"Include agent output\"**\n   - 📝 Select **\"Event logs\"**\n6. Click **Download**\n\nSave the downloaded `.json` file and use it as input to Calectr:\n\n```bash\npython main.py --caldera-json Files/operation_event-logs.json\n```\n\n##  Usage\n\n### Option 1: From Caldera JSON logs\n\n```bash\npython main.py --caldera-json Files/operation_event-logs.json\n```\n\nThis will:\n1. Download the latest MITRE ATT\u0026CK dataset\n2. Convert the JSON logs to a VECTR-compatible CSV (`Files/vectr_mapped_output.csv`)\n3. Upload the data to your VECTR instance using the API\n\n---\n\n### Option 2: From a VECTR-compatible CSV\n\n```bash\npython main.py --vectr-csv Files/vectr_mapped_output.csv\n```\n\nThis will:\n- Skip the MITRE and Caldera transformation steps\n- Directly upload the CSV to your VECTR instance\n\n---\n\n##  Sample Commands\n\n```bash\n# Convert and import from Caldera JSON\npython main.py --caldera-json Files/example-run.json\n\n# Direct import from VECTR CSV\npython main.py --vectr-csv Files/example-export.csv\n```\n\n\n##  License\n\nThis project is licensed under the MIT License.\n\n\u003e Portions adapted from [SecurityRiskAdvisors/vectr-tools](https://github.com/SecurityRiskAdvisors/vectr-tools).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhanunamikaze%2Fcalectr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhanunamikaze%2Fcalectr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhanunamikaze%2Fcalectr/lists"}