Skip to content

Commit a48eff9

Browse files
committed
Add GitHub Actions CI and README badges
Made-with: Cursor
1 parent d3c9e5a commit a48eff9

File tree

2 files changed

+88
-8
lines changed

2 files changed

+88
-8
lines changed

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# CI - Quality gate for creativity-exploit-engine
2+
# Runs on push and pull_request to main
3+
4+
name: CI
5+
6+
on:
7+
push:
8+
branches: [main]
9+
pull_request:
10+
branches: [main]
11+
12+
jobs:
13+
ci:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
python-version: ["3.10", "3.11"]
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
29+
- name: Upgrade pip
30+
run: python -m pip install --upgrade pip
31+
32+
- name: Cache pip
33+
uses: actions/cache@v4
34+
with:
35+
path: ~/.cache/pip
36+
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
37+
restore-keys: |
38+
${{ runner.os }}-pip-
39+
40+
- name: Install project and dev dependencies
41+
run: pip install -e ".[dev]"
42+
43+
- name: Run ruff
44+
run: ruff check src/creativity_engine tests
45+
46+
- name: Run mypy
47+
run: mypy src/creativity_engine tests
48+
49+
- name: Run pytest
50+
run: pytest
51+
52+
- name: CLI smoke test
53+
env:
54+
CRE_ENGINE_DUMMY: "1"
55+
run: python -m creativity_engine.cli seeds-demo

README.md

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# creativity-exploit-engine
22

3+
[![CI](https://github.com/codethor0/creativity-exploit-engine/actions/workflows/ci.yml/badge.svg)](https://github.com/codethor0/creativity-exploit-engine/actions/workflows/ci.yml)
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/codethor0/creativity-exploit-engine/blob/main/LICENSE)
5+
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
6+
37
## Code Signature
48

59
Author: Thor Thor
@@ -12,27 +16,48 @@ Project: creativity-exploit-engine
1216
This PoC implements the framework described in:
1317

1418
**"The Creativity Exploit: Toward an Algorithmic Framework for Security Imagination"**
15-
(Substack link / canonical URL here)
19+
(Canonical URL to be added when published.)
1620

17-
## What It Does
21+
## Overview
1822

1923
The Creativity Engine scores threat scenarios by **novelty** and **value** using embeddings and approximate nearest neighbor search. It can generate creative variations for threat modeling and red teaming via a simple evolutionary search over artifact combinations.
2024

2125
- **Novelty**: How different a scenario is from known ones (cosine distance in embedding space)
2226
- **Value**: Domain heuristic for security relevance (critical assets, risky entry points, advanced techniques)
2327
- **Surprise**: Optional hook for generative models (default disabled)
2428

25-
## Quickstart
26-
27-
### Install
29+
## Installation
2830

2931
```bash
30-
pip install -e .
31-
# With dev dependencies (pytest, mypy, ruff):
32+
# Local development (with dev dependencies: pytest, mypy, ruff)
3233
pip install -e ".[dev]"
34+
35+
# Or install from GitHub
36+
pip install "creativity-exploit-engine @ git+https://github.com/codethor0/creativity-exploit-engine.git"
37+
```
38+
39+
## Usage
40+
41+
### Minimal code example
42+
43+
```python
44+
from creativity_engine import Artifact, CreativityEngine, SentenceTransformerEmbedder
45+
46+
# For offline/testing: use DummyEmbedder instead (set CRE_ENGINE_DUMMY=1)
47+
embedder = SentenceTransformerEmbedder()
48+
engine = CreativityEngine(embedder=embedder)
49+
50+
artifact = Artifact(
51+
asset="domain controller",
52+
entry_point="VPN gateway",
53+
technique="password spraying",
54+
constraint="assume EDR present",
55+
)
56+
scores = engine.score(artifact)
57+
print(scores) # {"novelty": ..., "value": ..., "surprise": ..., "creativity": ...}
3358
```
3459

35-
### Run seeds-demo
60+
### CLI: seeds-demo
3661

3762
Runs a short evolutionary search with hard-coded seed artifacts:
3863

0 commit comments

Comments
 (0)