Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
243 commits
Select commit Hold shift + click to select a range
f4c314d
feat(librarian): Module C retrieval upgrades (stack base for #1088)
northdpole Sep 29, 2026
8368601
Address review feedback on OIE librarian base.
northdpole Oct 5, 2026
70af687
feat(harvester): requirement extract and GitHub URL ingest
northdpole Sep 29, 2026
583e987
feat(oie): B2 eval harness and CRE neighborhood scorer
northdpole Sep 29, 2026
7fe303e
feat(librarian): LLM SafetyGuard for C.4 adversarial / update flags
northdpole Oct 7, 2026
62d0c4b
Address review feedback on harvester and GitHub URL ingest.
northdpole Oct 5, 2026
25f07e1
Address review feedback on B2 harness scripts.
northdpole Oct 5, 2026
955528d
chore(oie): ASVS 5.0 provisional B2 sources and gold
northdpole Sep 29, 2026
86d320a
chore(oie): NIST 800-53 and remaining B2 sources/gold
northdpole Sep 29, 2026
62cedd4
feat(mappings): promote Related-orphan remaps into canonical fixtures
northdpole Sep 29, 2026
81faa70
Address review feedback on full-pipeline runner.
northdpole Oct 5, 2026
53562bf
feat(librarian): batch Module C query embeddings
northdpole Oct 7, 2026
657284b
fix(librarian): keep LLM SafetyGuard when restacking leaf-drilldown
northdpole Oct 7, 2026
ec9accd
fix(librarian): finish SafetyGuard + leaf-drilldown restack merge
northdpole Oct 7, 2026
e83b169
feat(oie): full-pipeline runner, docs, and experimental-flag notes
northdpole Sep 29, 2026
f180d0d
Add experimental OIE OWASP metadata agent for chat
cursoragent Oct 2, 2026
0b797a5
feat(librarian): promote d1-winner combo defaults (judge+cap8+top_k=3)
northdpole Sep 30, 2026
dfec9a8
Isolate OWASP meta concepts to chat and MCP only
cursoragent Oct 2, 2026
b3fce72
Add idempotent Alembic migration for OWASP agent meta tables.
northdpole Oct 14, 2026
a91d6e1
Fix OWASP agent probe gaps for chapters, people, membership, and CRE …
northdpole Oct 2, 2026
6953269
Add synth v2 probe suite and raise agent routing pass rate.
northdpole Oct 3, 2026
3c6bcff
Format owasp_agent modules with black for CI lint.
northdpole Oct 3, 2026
6da242e
Document OWASP agent setup, OIE relationship, and synth eval.
northdpole Oct 3, 2026
6d9eb6b
Black-format remaining owasp_agent modules for CI.
northdpole Oct 3, 2026
060e651
Answer OWASP entity chat probes from agent metadata.
northdpole Oct 12, 2026
8ce9b6c
Add multi-turn chat memory with New chat.
northdpole Oct 12, 2026
32aefc1
Harden OWASP agent routing for board, geo, CRE, and PG index.
northdpole Oct 14, 2026
e75479a
Route OWASP chat via multi-lane embedding similarity.
northdpole Oct 14, 2026
a69c0d3
Make OWASP agent meta embedding work on low-memory staging.
northdpole Oct 14, 2026
aeb2ebf
Add adversarial completion asker and align embed model ids.
northdpole Oct 14, 2026
033597b
Fix OWASP agent routing for chapter-in-city and project leaders.
northdpole Oct 14, 2026
34907f9
Treat named-chapter meetup asks as chapter lookup.
northdpole Oct 14, 2026
7a1cf7d
Reuse one Flask app in the adversarial completion asker.
northdpole Oct 14, 2026
3772492
feat(owasp-agent): sim-first retrieve with normalize, chapters, board…
northdpole Oct 15, 2026
1202fa4
fix(owasp-agent): stop substring event/chapter traps and city hardcodes
northdpole Oct 15, 2026
5369337
fix(owasp-agent): drop meta/normative keyword dump gates
northdpole Oct 15, 2026
b32ebbf
fix(owasp-agent): drop keyword dumps; derive project aliases on ingest
northdpole Oct 15, 2026
6a5867e
Fix first-run harvest: list tracked files, order-safe chunk joins, ch…
northdpole Oct 5, 2026
4d375d5
Add scheduled OIE runs: OWASP (10 min) and CRE expansion (daily)
northdpole Oct 5, 2026
643e6e1
Report the agent index target in scheduled agent_sync
northdpole Oct 5, 2026
eb95ff1
Chain oie_run Alembic revision after source_channel.
northdpole Oct 14, 2026
0994bed
Add signed-in admin showcase and Brevity bot skill.
northdpole Oct 6, 2026
080ffa8
Complete remaining admin showcase plan items.
northdpole Oct 6, 2026
c9f19de
Guard admin fetches on unmount and type the config catalog.
northdpole Oct 6, 2026
c102785
Fix mapping edit fields and lock HTTP OIE to dry-run.
northdpole Oct 6, 2026
dc8cb26
Drop unused ingest kwargs after HTTP OIE lock.
northdpole Oct 6, 2026
e2815e9
Run HTTP OIE start in a dry-run child process.
northdpole Oct 6, 2026
db09073
Add plan-required admin tests for disabled agent, pipeline errors, an…
northdpole Oct 6, 2026
a56f660
Isolate HTTP OIE on sqlite and surface failed starts.
northdpole Oct 6, 2026
1a6488a
Gate /admin on capabilities.admin and surface delete errors.
northdpole Oct 6, 2026
0690ed6
Treat failed changeset fetches as errors in admin review.
northdpole Oct 6, 2026
e8d7675
Drop restated admin-panel comments after Brevity review.
northdpole Oct 6, 2026
20f5733
Shorten admin login copy and drop restated MyOpenCRE blurb.
northdpole Oct 6, 2026
6859e05
Handle empty Impact keys with logs and JSON errors.
northdpole Oct 6, 2026
03612c2
Show impact warnings in Admin and format helpers.
northdpole Oct 6, 2026
5d77d3f
Keep stacked Nest agent env; agent DB is Postgres.
northdpole Oct 6, 2026
51c243c
Treat OWASP_AGENT_DB as Postgres only.
northdpole Oct 6, 2026
5a05310
Redact passwords in OWASP_AGENT_DB admin display.
northdpole Oct 6, 2026
5f3a6f3
Harden admin targets, ingest, and mapping errors.
northdpole Oct 6, 2026
40e16f5
Add admin repos.yaml editor, org expand, and one-off ingest.
northdpole Oct 6, 2026
84e9839
Harden repos.yaml org expand and yaml size limits.
northdpole Oct 6, 2026
3b58d49
Rebuild frontend bundle for repos.yaml admin editor.
northdpole Oct 6, 2026
c1bf1b5
Raise repos.yaml admin cap to 4MiB for org expands.
northdpole Oct 6, 2026
dce904e
Decouple repos.yaml config from GitHub org expansion.
northdpole Oct 6, 2026
c8f3298
Treat the OWASP agent as a built-in ingest resource.
northdpole Oct 6, 2026
2a4015d
Reject inaccessible GitHub sources at config time.
northdpole Oct 6, 2026
a477189
Redesign admin IA: dashboard, config, pipeline, graph.
northdpole Oct 6, 2026
bccae60
Rebuild frontend bundle for the admin IA redesign.
northdpole Oct 6, 2026
87824bc
Persist Add org on save and mark apply_failed on the strip.
northdpole Oct 6, 2026
2f0da3f
Drop OWASP_AGENT_DB; agent uses the main app Postgres.
northdpole Oct 6, 2026
9ab2499
Fix OIE child import path; agent index uses the main DB.
northdpole Oct 6, 2026
555c4e7
Run admin OIE on Docker Postgres; drop sqlite:// child cache.
northdpole Oct 6, 2026
61bfcf9
Align Flask/agent DB env order; always pin psycopg2 dialect.
northdpole Oct 6, 2026
1422dee
Make admin ingest run OIE end-to-end without false Module A errors.
northdpole Oct 6, 2026
0d372bc
Skip invalid harvest docs; surface agent last_sync from meta_entity.
northdpole Oct 6, 2026
3322ed0
Restore degraded stop contract; tighten admin ingest defaults.
northdpole Oct 6, 2026
1e5b4e5
Fix Graph management Accept/errors for empty OIE import runs.
northdpole Oct 6, 2026
f3ec363
Surface OIE skip reasons, flags, and graph path in pipeline logs.
northdpole Oct 6, 2026
3d820cb
Auto-pull CRE graph in admin-local when Postgres is empty.
northdpole Oct 6, 2026
15a4fa1
Wire Postgres admin bootstrap into make install and make dev.
northdpole Oct 6, 2026
f814150
Wire golden-set harvest and OWASP agent sync into Admin Config.
northdpole Oct 6, 2026
45eb358
Add Mac handover for admin/OIE/agent E2E validation.
northdpole Oct 6, 2026
afb0948
Chain admin panel tables migration after oie_run
northdpole Oct 6, 2026
aabb90b
Black-format admin_imports_api_test for CI
northdpole Oct 6, 2026
7871306
Run admin OIE ingest through Modules B and C by default.
northdpole Oct 7, 2026
bfcb1e4
Paint Module C auto-filed graph edges and nodes in the explorer.
northdpole Oct 7, 2026
0f22476
Add Module C.1 graph filing to the OIE A→B→C pipeline.
northdpole Oct 7, 2026
7b9b007
Default Module C.1 auto-filing off behind an admin Config toggle.
northdpole Oct 7, 2026
18ed280
Restore clarify followup test dropped in admin rebase.
northdpole Oct 12, 2026
5657668
Parse OWASP event pages and harvest event repos
northdpole Oct 6, 2026
1ebd0f8
Embed auto-filed graph nodes in the CRE expansion job
northdpole Oct 6, 2026
1210ac2
Make event page parsing linear-time and clean Playwright fallback text
northdpole Oct 6, 2026
bc13dc6
Make event-repo harvesting opt-in (OIE_HARVEST_EVENTS)
northdpole Oct 6, 2026
5308183
style: format files flagged by CI (black, prettier)
northdpole Oct 22, 2026
fcefa22
style: format files flagged by CI (black, prettier)
northdpole Oct 22, 2026
9262fde
test: fix stale admin config assertion, env leaks between tests, and …
northdpole Oct 22, 2026
3351aeb
test: embedding-failure scheduler test needs graph filing enabled now…
northdpole Oct 22, 2026
934f01c
Merge admin-panel-showcase into oie-event-pages-embeddings (picks up …
northdpole Oct 22, 2026
b6a5ca7
Add OIE RQ A→B→C fan-out and Admin OIE queue tab.
northdpole Oct 9, 2026
79bb6e6
Harden OWASP agent for Nest-backed November demo.
northdpole Oct 10, 2026
5a668c3
Restrict staging login to an explicit email allowlist.
northdpole Oct 10, 2026
fd999a8
Document homeserver staging behind Cloudflare Tunnel.
northdpole Oct 10, 2026
331a883
Add dedicated Compose stack for staging.opencre.org.
northdpole Oct 10, 2026
6c699a7
Make promoted Module C feature flags the runtime default.
northdpole Oct 11, 2026
370f77c
Add admin API tokens and JWT request auth.
northdpole Oct 11, 2026
fe2e215
Persist OIE LLM caches and CRE summaries; add CE/cosine flags.
northdpole Oct 11, 2026
0583710
Batch pairwise+grounding into one LLM call; fix matrix DB URL clobber.
northdpole Oct 12, 2026
4d402f6
Pin cost-free Module C path in promoted defaults and staging.
northdpole Oct 11, 2026
aad9832
Add Admin REST + UI to requeue/cancel failed OIE RQ jobs.
northdpole Oct 12, 2026
eccb0e2
Redesign admin panel with CRE blues, env/.env diff, and review widgets.
northdpole Oct 11, 2026
36d0310
Allow Bearer on Admin OIE REST and fix staging filing lookup.
northdpole Oct 13, 2026
3bbc52c
Add Admin active ingestions status with config, progress, and ETA.
northdpole Oct 13, 2026
60c4136
Fix Admin ingest ETA to use Module C remaining, not HI backlog.
northdpole Oct 13, 2026
dea2098
fix(auth): admit admin API keys on MyOpenCRE after MCP rebase
northdpole Oct 14, 2026
bb157b8
feat(mcp): add fact-only ask tool for Cursor multi-call synthesis
northdpole Oct 14, 2026
3ba4444
fix(mcp): only treat CRE-shaped ids as ask security hits
northdpole Oct 14, 2026
b471279
feat(mcp): staging Streamable HTTP with Admin JWT gate for ask
northdpole Oct 14, 2026
d85d55f
fix(mcp): run ask meta router in app context before CRE defer
northdpole Oct 15, 2026
8805093
fix(owasp-agent): restore sim-first router after fanout restack
northdpole Oct 15, 2026
6900d15
fix(owasp-agent): restore intent/sim-first agent after fanout restack
northdpole Oct 15, 2026
9c6ea5a
feat(oie-scheduler): admin-editable job interval and on/off
northdpole Oct 19, 2026
78bc75b
feat(admin): Schedules tab to change job intervals and switch jobs off
northdpole Oct 19, 2026
bdae15e
feat(oie-scheduler): owasp job runs daily by default; health stalenes…
northdpole Oct 19, 2026
a94289b
style: format files flagged by CI (black); keep test environment chan…
northdpole Oct 22, 2026
c2308ef
test(owasp-agent): add staging regression + AppSec USA attendee suite…
northdpole Oct 17, 2026
ca28e0e
fix(owasp-agent): index-resolved chapters, defensive-vs-attack gate, …
northdpole Oct 17, 2026
7e28800
fix(mcp): use chatbot embedding retrieval for ask security facts
northdpole Oct 16, 2026
25450d3
fix(owasp-agent): board name parsing, indexed event lookup, metro cha…
northdpole Oct 17, 2026
c7fd81a
fix(owasp-agent): close the 24 non-structural edge misses
northdpole Oct 16, 2026
3bfb12e
fix(owasp-agent): meta-lane grounding floor, compound questions, near…
northdpole Oct 17, 2026
2f9187c
feat(owasp-agent): curated node facts for structural standard questions
northdpole Oct 17, 2026
f6c15e0
fix(owasp-agent): whole-name project match first; ambiguous first nam…
northdpole Oct 17, 2026
0e3e667
feat(comprehension): derive cited digests/claims from harvested sourc…
northdpole Oct 17, 2026
d03da02
feat(comprehension): store per-document claims, skip translated pages…
northdpole Oct 17, 2026
76a76b5
feat(comprehension): people/talks profile and multi-repo runs
northdpole Oct 17, 2026
cffb8cd
feat(comprehension): --exclude for held-out repos
northdpole Oct 17, 2026
963b040
fix(comprehension): abstain instead of surfacing raw claims when synt…
northdpole Oct 18, 2026
77cd246
feat(comprehension): dedicated retrieval over comprehension docs; nar…
northdpole Oct 18, 2026
d355eb3
feat(comprehension): scope retrieval to projects named in the question
northdpole Oct 18, 2026
d7487e5
fix(comprehension): deterministic synthesis (temperature 0), answer p…
northdpole Oct 18, 2026
ac80bd8
feat(comprehension): OWASP_COMPREHENSION_SCOPE switch for ablation
northdpole Oct 18, 2026
b6dfb68
feat(comprehension): embed raw source chunks for detail recall; scopi…
northdpole Oct 18, 2026
8d47a05
feat(comprehension): feature-flagged expand/hybrid/rerank/query/verif…
northdpole Oct 18, 2026
803d00c
feat(comprehension): embed-once cache, prefetch, merged single-call m…
northdpole Oct 18, 2026
5a4057c
perf(owasp-agent): optional half-precision HNSW vector search (OWASP_…
northdpole Oct 19, 2026
2b5f788
perf(owasp-agent): share one PromptHandler per process
northdpole Oct 19, 2026
ba514bc
perf(comprehension): selective AND keyword search with capped candida…
northdpole Oct 19, 2026
b6dc5a6
feat(comprehension): cost estimator, thinking off for bulk digests, s…
northdpole Oct 19, 2026
a71bae7
fix(comprehension): raw chunk ids no longer collide on long paths; ke…
northdpole Oct 19, 2026
d9c071b
feat(comprehension): OWASP_COMPREHENSION_SOURCES sets how many retrie…
northdpole Oct 19, 2026
b52333b
feat(comprehension): optional LLM context sentence and likely questio…
northdpole Oct 19, 2026
264513b
fix(owasp-agent): drop an appended 'ignore previous instructions' cla…
northdpole Oct 19, 2026
7a58d65
feat(comprehension): keyword search requires quoted and Title-Case na…
northdpole Oct 19, 2026
7591cee
feat(comprehension): OWASP_COMPREHENSION_MODEL picks the model that w…
northdpole Oct 19, 2026
afe661d
fix(comprehension): hybrid search supplements the dense head instead …
northdpole Oct 19, 2026
47b86c2
feat(comprehension): OWASP_COMPREHENSION_DOCS limits search to raw ch…
northdpole Oct 19, 2026
334f4f7
feat(migrations): half-precision HNSW index for the OWASP agent embed…
northdpole Oct 20, 2026
3f84897
feat(comprehension): OWASP_CX_LONGCTX reads a whole project for one-p…
northdpole Oct 20, 2026
94194df
docs(env): document the OWASP comprehension settings and the measured…
northdpole Oct 20, 2026
5a879db
feat(comprehension): L4 reads up to three named projects whole (OWASP…
northdpole Oct 20, 2026
c832b00
feat(comprehension): OWASP_CX_FAST (answer model with thinking off) a…
northdpole Oct 20, 2026
20ae48d
fix(comprehension): L4 reads one named project by default (three scor…
northdpole Oct 20, 2026
de66561
feat(comprehension): OWASP_CX_THINK_EFFORT sets the answer model's th…
northdpole Oct 21, 2026
ff0a10b
perf(mcp): run ask in a worker thread so parallel questions overlap
northdpole Oct 21, 2026
3d36241
docs(env): measured latency of the thinking settings and the MCP ask …
northdpole Oct 21, 2026
0342d6a
perf(mcp): warm the answer path in the background at server start
northdpole Oct 21, 2026
c263620
feat(comprehension): ask which project is meant when nothing is found
northdpole Oct 21, 2026
cb0376c
feat(comprehension): OWASP_CX_EDITION answers for the edition the que…
northdpole Oct 21, 2026
4507eeb
feat(comprehension): OWASP_CX_PROJROUTE picks a project by overview s…
northdpole Oct 21, 2026
7997289
feat(comprehension): --supplement indexes repo markdown the harvester…
northdpole Oct 21, 2026
7b51d63
docs(env): whole-project cap 2M chars (ASVS and other big projects no…
northdpole Oct 21, 2026
9e1c56e
feat(comprehension): print metered LLM tokens and cost at the end of …
northdpole Oct 21, 2026
2ac548e
feat(comprehension): --skip-unchanged makes raw ingest resumable and …
northdpole Oct 21, 2026
71dd7b0
perf(comprehension): default to 16 ingest workers (24 workers: 55 s v…
northdpole Oct 21, 2026
3bad528
feat(comprehension): OWASP_CX_COMPLETE asks for every part of multi-p…
northdpole Oct 21, 2026
fa4a909
feat(mcp): read-only research tools for calling agents (search, list,…
northdpole Oct 21, 2026
c926cf0
docs(oie): replatform options draft
northdpole Oct 21, 2026
c0b0ae7
fix(comprehension): raw ingest retries embedding calls and writes in …
northdpole Oct 22, 2026
7807cad
feat(comprehension): ROUTE flag - stronger reader for people/count qu…
northdpole Oct 22, 2026
1706b58
feat(mcp): ask returns the source passages its answer used (evidence)
northdpole Oct 22, 2026
4bc2910
feat(comprehension): OWASP_CX_PERSTD reads each named project and ans…
northdpole Oct 22, 2026
51ac85d
feat(comprehension): Nest loader - current project leaders/level/date…
northdpole Oct 22, 2026
29b9042
feat(comprehension): talk catalogue loader (title/speaker/date/length…
northdpole Oct 22, 2026
4c92743
fix(comprehension): Nest pager reads a failing page item by item and …
northdpole Oct 22, 2026
44dc468
chore(oie): trim #1088 for the staging rollout
northdpole Nov 1, 2026
692bc35
Merge remote-tracking branch 'origin/wip/oie-pipeline-eval-harness' i…
northdpole Nov 1, 2026
4074ac7
chore(harvester): trim #1115 for the staging rollout
northdpole Nov 1, 2026
1524c9f
Merge branch 'trim/1115' into trim/1116
northdpole Nov 1, 2026
f694b1c
chore(oie): trim #1116 and guard destructive eval scripts
northdpole Nov 1, 2026
71b6abd
Merge branch 'trim/1116' into trim/1117
northdpole Nov 1, 2026
866b86f
chore(oie): trim #1117 for the staging rollout
northdpole Nov 1, 2026
abe9547
Merge branch 'trim/1117' into trim/1118
northdpole Nov 1, 2026
fb4c782
chore(oie): trim #1118 for the staging rollout
northdpole Nov 1, 2026
adac09b
Merge branch 'trim/1118' into trim/1119
northdpole Nov 1, 2026
1a7c875
Merge branch 'trim/1119' into trim/1120
northdpole Nov 1, 2026
98d5c50
style: black-format llm_safety_guard.py
northdpole Nov 1, 2026
287cc1d
trim(#1120): fix merge-conflict markers, guard full pipeline, drop de…
northdpole Nov 1, 2026
b756876
Merge branch 'trim/1120' into trim/1125
northdpole Nov 1, 2026
8f1b203
Merge branch 'trim/1125' into trim/1127
northdpole Nov 1, 2026
d0e661c
trim(#1127): drop adversarial asker/batch scripts and canned CRE foll…
northdpole Nov 1, 2026
b8ecf3f
Merge branch 'trim/1127' into trim/1137
northdpole Nov 1, 2026
005ebcd
trim(#1137): drop brevity-bot skills and stale handover doc, restore …
northdpole Nov 1, 2026
d6eb429
Merge branch 'trim/1137' into trim/1136
northdpole Nov 1, 2026
85238d2
Merge branch 'trim/1136' into trim/1142
northdpole Nov 1, 2026
2db9f94
trim(#1142): no credentialed CORS without an allowlist, OIE workers o…
northdpole Nov 1, 2026
977e575
trim(#1142): admin upstream-sync-and-ingest no longer replaces existi…
northdpole Nov 1, 2026
de5b931
Merge branch 'trim/1142' into trim/1155
northdpole Nov 1, 2026
1158e47
trim(#1155): drop laptop-local edge probe scripts, make node metadata…
northdpole Nov 1, 2026
cd05687
Merge branch 'trim/1155' into trim/1159
northdpole Nov 1, 2026
ddfb663
trim(#1159): drop cambridge->boston alias, dead locals, test env/temp…
northdpole Nov 1, 2026
5d46f34
Merge branch 'trim/1159' into trim/1158
northdpole Nov 1, 2026
dcf44f7
trim(#1158): strip_injection no longer truncates legitimate questions…
northdpole Nov 1, 2026
769401f
refactor(owasp-agent): move the meta-embedding push out of sync_all i…
northdpole Nov 1, 2026
c9dae24
chore: drop generated frontend bundle (rebuild at deploy)
northdpole Nov 1, 2026
b07a6d9
chore(owasp-agent): type embed_sync and its test
northdpole Nov 1, 2026
d86f12f
Merge branch 'trim/1127' into trim/1137
northdpole Nov 1, 2026
81fae82
fix(owasp-agent): admin sync and scheduler stage apply the opt-in met…
northdpole Nov 1, 2026
1f00df3
Merge branch 'trim/1137' into trim/1136
northdpole Nov 1, 2026
a600ae0
fix(oie-scheduler): embed_filed_nodes defaults off, document OIE_HARV…
northdpole Nov 1, 2026
cb7f9d6
Merge branch 'trim/1136' into trim/1142
northdpole Nov 1, 2026
fc0079b
Merge branch 'trim/1142' into trim/1155
northdpole Nov 1, 2026
443e6f4
Merge branch 'trim/1155' into trim/1159
northdpole Nov 1, 2026
1690740
Merge branch 'trim/1159' into trim/1158
northdpole Nov 1, 2026
569ced4
docs(env): OWASP_CX_LONGCTX off and OWASP_CX_LONGCTX_CHARS back to th…
northdpole Nov 1, 2026
cf93371
test(owasp-agent): sync and concepts must not import application.data…
northdpole Nov 1, 2026
f1c5640
Merge branch 'trim/1127' into trim/1137
northdpole Nov 1, 2026
1dfabfd
Merge branch 'trim/1137' into trim/1136
northdpole Nov 1, 2026
7a85643
Merge branch 'trim/1136' into trim/1142
northdpole Nov 1, 2026
29865ca
fix(admin): CRE embedding guard only treats a missing table as empty …
northdpole Nov 1, 2026
6a25fa7
Merge branch 'trim/1142' into trim/1155
northdpole Nov 1, 2026
8d6a34e
Merge branch 'trim/1155' into trim/1159
northdpole Nov 1, 2026
df09228
Merge branch 'trim/1159' into trim/1158
northdpole Nov 1, 2026
823027a
test(owasp-agent): restore the environment with a plain helper instea…
northdpole Nov 1, 2026
da23c54
Merge branch 'trim/1127' into trim/1137
northdpole Nov 1, 2026
ad96712
test(owasp-agent): exercise the meta-embedding push through injected …
northdpole Nov 1, 2026
23f3427
Merge branch 'trim/1137' into trim/1136
northdpole Nov 1, 2026
d670774
test(oie-scheduler): restore the environment with a plain helper in t…
northdpole Nov 1, 2026
7c22666
Merge branch 'trim/1136' into trim/1142
northdpole Nov 1, 2026
8161414
docs(staging): use placeholder tester addresses; test: restore the en…
northdpole Nov 1, 2026
bf51c47
Merge branch 'trim/1142' into trim/1155
northdpole Nov 1, 2026
0ae8dd7
Merge branch 'trim/1155' into trim/1159
northdpole Nov 1, 2026
8d24c55
test(owasp-agent): restore the environment with a plain helper in ind…
northdpole Nov 1, 2026
2e453ad
Merge branch 'trim/1159' into trim/1158
northdpole Nov 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ tmp
.vscode
.github
.git
.harvester_cache/
logs/
.cursor/
.cursorignore
*.nohup.out

# This file specifies files that are *not* uploaded to Google Cloud
# using gcloud. It follows the same syntax as .gitignore, with the addition of
Expand Down
112 changes: 110 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# Never commit your real `.env` file to version control.
# ------------------------------------------------------------------------------
# Database
# Local Docker (make docker-postgres / make admin-local):
# postgresql://cre:password@127.0.0.1:5432/cre
# `make admin-local` starts that container when the URL is unreachable and
# never falls back to SQLite for the admin showcase.

DEV_DATABASE_URL=postgresql://user:password@localhost:5432/opencre

Expand Down Expand Up @@ -41,6 +45,27 @@ CRE_ENABLE_MYOPENCRE=false

CRE_ENABLE_LOGIN=false

# Experimental OIE OWASP metadata agent (chat + MCP only — never CRE graph UI).
# Off by default. Uses the main app Postgres (DEV_DATABASE_URL / DATABASE_URL)
# for the agent index + pgvector. Reachable from /completion and MCP owasp_meta_* tools.
OWASP_AGENT_ENABLED=false

# Module C.1 graph filing (Automatically linked to). Off by default — leave Module C
# decisions in decision_queue for review; set true to auto-add high-confidence links.
OIE_GRAPH_FILING_ENABLED=false

# OIE scheduler: both off by default (they spend quota / write embeddings).
# OIE_HARVEST_EVENTS=1 also harvests www-event-* repos.
# OIE_EMBED_FILED_NODES=1 embeds nodes that Module C auto-filing created.
OIE_HARVEST_EVENTS=false
OIE_EMBED_FILED_NODES=false

# Nest REST API key (https://nest.owasp.org — create via GraphQL while logged in)
NEST_API_KEY=
NEST_API_BASE=https://nest.owasp.org/api/v0
# Set to 1 to crawl all www-chapter / www-project repos during sync (slow).
OWASP_AGENT_CRAWL_REPOS=0

# Embeddings

NO_GEN_EMBEDDINGS=false
Expand All @@ -52,14 +77,25 @@ GOOGLE_CLIENT_SECRET=your-client-secret
GOOGLE_SECRET_JSON=path/to/secret.json
LOGIN_ALLOWED_DOMAINS=example.com

# GCP
# GCP / Gemini (optional — any LiteLLM provider works for Module B)

GCP_NATIVE=false
GEMINI_API_KEY=your-gemini-api-key
VERTEX_CHAT_MODEL=gemini-2.5-flash
VERTEX_EMBED_CONTENT_MODEL=gemini-embedding-001

# Noise / Relevance Filter (Module B)
# Other chat providers (LiteLLM). Set the key that matches CRE_NOISE_FILTER_LLM_MODEL.
# OPENAI_API_KEY=sk-...
# ANTHROPIC_API_KEY=sk-ant-...
# GROQ_API_KEY=gsk_...
# MISTRAL_API_KEY=...
# OPENROUTER_API_KEY=...

# Noise / Relevance Filter (Module B) — LiteLLM model id (provider/model)
# Examples: gemini/gemini-2.5-flash-lite | openai/gpt-4o-mini |
# anthropic/claude-haiku-4-5 | groq/llama-3.3-70b-versatile
# Any chat model LiteLLM supports; mid-size models usually work best
# (cheap + reliable for this classify gate — avoid tiny completion stubs).

CRE_NOISE_FILTER_LLM_MODEL=gemini/gemini-2.5-flash-lite
CRE_NOISE_FILTER_BATCH_SIZE=10
Expand All @@ -86,3 +122,75 @@ CRE_LIBRARIAN_LINK_THRESHOLD=0.8
CRE_LIBRARIAN_BATCH_SIZE=32
CRE_LIBRARIAN_ECE_TARGET=0.10
CRE_LIBRARIAN_CONFORMAL_ALPHA=0.10

# --- OWASP agent answers: ingestion-time comprehension (#1158) ---------------------------
# Values below are the measured winning combination on staging (full 589-question set:
# whole-project context 57.6% correct vs 54.7% with no flags, ~20 s end to end). Every new
# feature is off in code unless its flag is set, EXCEPT OWASP_COMPREHENSION_ENABLED and
# OWASP_COMPREHENSION_ABSTAIN, which default to 1 in code (comprehension/answer.py): a database
# with comprehension rows answers from them (and abstains) unless you set them to 0.
# Retrieval depth for the OWASP agent lane (default 8) and for comprehension documents.
OWASP_AGENT_TOP_K=16
OWASP_COMPREHENSION_TOP_K=24
# Answer from ingestion-time comprehension documents; say "not found" instead of guessing.
OWASP_COMPREHENSION_ENABLED=1
OWASP_COMPREHENSION_ABSTAIN=1
# How many retrieved documents the answer reads (more did not help: 24 scored the same as 10).
OWASP_COMPREHENSION_SOURCES=10
# Search only "raw" source chunks or only "digest" documents (default all). Raw chunks alone
# score within ~3 points of all, which is the cheap full-import option.
OWASP_COMPREHENSION_DOCS=all
# Model that writes the final answer ('' = the default chat model). Gemini Pro did not help.
OWASP_COMPREHENSION_MODEL=
# Scope retrieval to the project named in the question as a score boost. Hurt (-10 points): keep 0.
OWASP_COMPREHENSION_SCOPE=0
# Half-precision HNSW vector search. Needs migration e5f6a7b8c9d0 (the index); 1 cuts ~10 s
# of database time per question on a large embeddings table.
OWASP_PGVECTOR_HALFVEC=0

# Feature flags (1 = on). Measured on the 252-question sample unless noted.
# L4 whole-project context: when a question names exactly one project that fits, the model
# reads the project's whole text instead of snippets (+3 points on the full set).
# Off by default (as in code): each question reads up to LONGCTX_CHARS of text, so enable it
# deliberately and keep LONGCTX_CHARS bounded on public chat.
OWASP_CX_LONGCTX=0
# Max characters of one project to read whole (code default).
OWASP_CX_LONGCTX_CHARS=700000
# How many named projects to read whole at once (questions naming more fall back to retrieval).
# 1 scored 59.1% on the sample; 3 scored 56.3% (counts and multi-part got worse), so keep 1.
OWASP_CX_LONGCTX_PROJECTS=1
# Off: hybrid keyword search (-2.5 points, +5 s), rerank (-2), query rewrite (-3), verify
# (+/-3, hurts with LONGCTX), per-project (0), expand (+1, noise), count (+1, slower),
# merged single call (-13, loses citations), in-process answer cache (real traffic only).
# Final-answer model with thinking off (latency); multi-part questions answered part by part.
OWASP_CX_FAST=0
# Thinking budget for the final answer: '' (model default), low, medium or high. Measured: low and
# medium are NOT faster than the default (~7 s); only OWASP_CX_FAST=1 (thinking off, 2.5 s but
# 49% on the sample, 54% with OWASP_COMPREHENSION_MODEL=gemini/gemini-2.5-flash-lite) is.
OWASP_CX_THINK_EFFORT=
OWASP_CX_DECOMPOSE=0
OWASP_CX_HYBRID=0
OWASP_CX_RERANK=0
OWASP_CX_QUERY=0
OWASP_CX_VERIFY=0
OWASP_CX_PERPROJECT=0
OWASP_CX_EXPAND=0
OWASP_CX_COUNT=0
OWASP_CX_MERGED=0
OWASP_CX_CACHE=0
# Cheap model used by the rerank/query/verify helpers when those flags are on.
OWASP_CX_HELPER_MODEL=gemini/gemini-2.5-flash-lite

# Ingestion (scripts/comprehend_standard.py): bulk digests and chunk enrichment use a cheap
# model with thinking off; repo overviews use a stronger one. Run with --estimate first.
CRE_COMPREHENSION_BULK_MODEL=gemini/gemini-2.5-flash
CRE_COMPREHENSION_OVERVIEW_MODEL=gemini/gemini-2.5-pro
CRE_COMPREHENSION_ENRICH_MODEL=gemini/gemini-2.5-flash-lite
CRE_COMPREHENSION_THINKING=off

# Warm the answer path in the background at server start (the first question after a restart
# otherwise takes ~30 s). 0 disables.
OWASP_WARMUP=1

# Remote MCP server: how many questions may be answered at the same time (each in its own thread).
OPENCRE_MCP_ASK_CONCURRENCY=8
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,16 @@ standards_cache.sqlite
!docs/Mid_eval_blog_gsoc2026/module_B_mideval_blog.md
!docs/Final_eval_blog_gsoc2026/module_B_final_blog.md
!application/utils/librarian/README.md
!application/utils/owasp_agent/README.md
!docs/gsoc_2026_module_c/*.md
!docs/gsoc_2026_module_a/*.md
!docs/Final_eval_blog_gsoc2026/*.md
!docs/gsoc_2026_module_b/module_a_contract.md
!docs/gsoc_2026_module_b/module_c_contract.md
!docs/gsoc_2026_module_b/module_b_runbook.md
!docs/gsoc_2026_module_b/final_metrics.md
!docs/oie/*.md
!scripts/oie_owasp_eval/experiments/*.md

### Dev DBDumps
*.sql
Expand All @@ -91,6 +94,8 @@ neo4j/
.mypy_cache
tmp/

import_telemetry.json

### CREs dir
cres/*
### Local project management tooling
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ FROM python:3.11 as run
COPY --from=build /code /code
WORKDIR /code
COPY ./scripts/prod-docker-entrypoint.sh /code
RUN pip install -r requirements.txt gunicorn
# Staging Compose may pass requirements-dev.txt (Librarian ML / OIE Module C.2).
# Default stays prod requirements.txt for Heroku slug size.
ARG REQUIREMENTS_FILE=requirements.txt
RUN pip install -r "${REQUIREMENTS_FILE}" gunicorn

ENV INSECURE_REQUESTS=1
ENV FLASK_CONFIG="production"
Expand Down
97 changes: 89 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.ONESHELL:

.PHONY: run test covers install-deps dev docker lint frontend clean all e2e e2e-db
.PHONY: run test covers install-deps dev dev-flask docker lint frontend clean all e2e e2e-db admin-local owasp-agent-sync owasp-agent-merge-concepts owasp-agent-synth-eval

prod-run:
gunicorn cre:app --log-file=-
Expand Down Expand Up @@ -70,15 +70,39 @@ docker-postgres:

start-containers: docker-neo4j docker-redis

# RQ work-horses fork after Flask/torch load. On macOS, unset device → MPS and
# CrashReporter popups from Homebrew Python.app. Force CPU unless overridden.
CRE_LIBRARIAN_DEVICE?=cpu
start-worker:
. ./venv/bin/activate && FLASK_APP=`pwd`/cre.py python cre.py --start_worker
. ./venv/bin/activate && \
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES \
CRE_LIBRARIAN_DEVICE="$(CRE_LIBRARIAN_DEVICE)" \
FLASK_APP=`pwd`/cre.py python cre.py --start_worker

# Local OIE RQ fleet (queue ``oie``). Default 10; override with OIE_WORKER_COUNT=N.
# Double-fork via scripts/start_oie_workers.py so workers survive make exit (SIGHUP).
OIE_WORKER_COUNT?=10
start-oie-workers:
. ./venv/bin/activate && \
OIE_WORKER_COUNT="$(OIE_WORKER_COUNT)" \
CRE_LIBRARIAN_DEVICE="$(CRE_LIBRARIAN_DEVICE)" \
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES \
python scripts/start_oie_workers.py

upstream-sync:
. ./venv/bin/activate && python cre.py --upstream_sync
. ./venv/bin/activate &&\
python cre.py --upstream_sync --cache_file "$(or $(DEV_DATABASE_URL),$(CRE_CACHE_FILE),$(CURDIR)/standards_cache.sqlite)"

PORT?=5000

dev-flask:
# Local app against Docker Postgres: migrate, upstream-sync if cre/node empty, Flask.
# Same entrypoint as admin showcase / OIE local (no SQLite). macOS AirPlay often
# holds :5000 — use PORT=5001 make dev if bind fails.
dev dev-flask admin-local:
bash ./scripts/run_admin_local.sh --port $(PORT) $(ADMIN_LOCAL_ARGS)

# Bare Flask without Postgres bootstrap (legacy / CI helpers). Prefer `make dev`.
dev-flask-sqlite:
. ./venv/bin/activate && INSECURE_REQUESTS=1 FLASK_APP=`pwd`/cre.py FLASK_CONFIG=development flask run --port $(PORT)

dev-flask-docker:
Expand Down Expand Up @@ -136,15 +160,28 @@ install-deps-typescript:
install-deps: install-deps-python install-deps-typescript

install-python:
virtualenv -p python3 venv
@if [ ! -d "./venv" ]; then \
if command -v virtualenv >/dev/null 2>&1; then \
virtualenv -p python3 venv; \
else \
echo "virtualenv not on PATH — using python3 -m venv"; \
python3 -m venv venv; \
fi; \
fi
. ./venv/bin/activate &&\
make install-deps-python &&\
playwright install # Python embeddings/scraping (prompt_client); NOT frontend e2e — keep when migrating to Cypress

install-typescript:
yarn add webpack && cd application/frontend && yarn build
# Yarn install only. Do not `yarn add` or `yarn build` here: webpack is
# already in package.json, and a local build rewrites
# application/frontend/www/bundle.js (tracked so Heroku can serve the UI
# without a Node compile step). That was dirtying contributor trees after
# `make install`. Rebuild with `make frontend` when you change the UI.
install-typescript: install-deps-typescript

install: install-typescript install-python migrate-upgrade
# Deps + Docker Postgres schema + CRE upstream graph when empty (see run_admin_local.sh).
install: install-typescript install-python
bash ./scripts/run_admin_local.sh --migrate-only $(ADMIN_LOCAL_ARGS)

docker-dev:
docker build -f Dockerfile-dev -t opencre-dev:$(shell git rev-parse HEAD) .
Expand Down Expand Up @@ -185,10 +222,39 @@ oie-pipeline:
[ -d "./venv" ] && . ./venv/bin/activate &&\
PYTHONPATH=. python scripts/run_oie_pipeline.py --cache_file "$(or $(CACHE_FILE),sqlite:///$(CURDIR)/standards_cache.sqlite)" $(OIE_ARGS)

# Deterministic OIE base metadata (Node then CRE document_metadata.oie). Fill-if-missing.
# Example:
# make oie-tag-base CACHE_FILE=postgresql://cre:password@127.0.0.1:5432/cre_prodclone
oie-tag-base:
[ -d "./venv" ] && . ./venv/bin/activate &&\
PYTHONPATH=. python scripts/oie_ensure_base_metadata.py \
--cache-file "$(or $(CACHE_FILE),$(or $(DEV_DATABASE_URL),postgresql://cre:password@127.0.0.1:5432/cre))" \
$(OIE_TAG_ARGS)

# Local OIE bootstrap: start cre-postgres, migrate, sync CRE hub (local|upstream).
# Examples:
# make setup-oie
# make setup-oie SETUP_OIE_ARGS='--source upstream --install-ml --calibrate'
setup-oie:
bash ./scripts/setup_oie.sh $(SETUP_OIE_ARGS)

oie-e2e-smoke:
[ -d "./venv" ] && . ./venv/bin/activate &&\
PYTHONPATH=. python scripts/run_oie_e2e_smoke.py

owasp-agent-sync:
[ -d "./venv" ] && . ./venv/bin/activate &&\
PYTHONPATH=. python scripts/owasp_agent_sync.py $(OWASP_AGENT_SYNC_ARGS)

owasp-agent-merge-concepts:
[ -d "./venv" ] && . ./venv/bin/activate &&\
PYTHONPATH=. python scripts/owasp_agent_merge_concepts.py $(OWASP_AGENT_MERGE_ARGS)

# Score fixtures/owasp_agent_synth_v2.jsonl against OWASP_AGENT_DB (see application/utils/owasp_agent/README.md).
owasp-agent-synth-eval:
[ -d "./venv" ] && . ./venv/bin/activate &&\
OWASP_AGENT_ENABLED=1 PYTHONPATH=. python scripts/owasp_agent_synth_eval.py

openapi-generate:
[ -d "./venv" ] && . ./venv/bin/activate &&\
python scripts/generate_openapi.py
Expand Down Expand Up @@ -240,6 +306,21 @@ monitor-chatbot-health-prod:
--base-url "https://opencre.org" \
--output-json "$(CURDIR)/tmp/prod-chatbot-health.json"

# Scheduled OIE jobs (Postgres only). Cron `make oie-tick` every 10 minutes: each
# job runs once per slot (owasp every 10 min, cre_expansion daily) and is a no-op
# otherwise. Overrides: OIE_JOB=owasp|cre_expansion|all, OIE_FORCE=1, OIE_DRY_RUN=1.
oie-tick:
@[ -d "./.venv" ] && . ./.venv/bin/activate || ([ -d "./venv" ] && . ./venv/bin/activate); \
export CRE_CACHE_FILE="$${CRE_CACHE_FILE:-postgresql://cre:password@127.0.0.1:5432/cre}"; \
python cre.py --cache_file "$$CRE_CACHE_FILE" --run_scheduled "$${OIE_JOB:-all}" \
$${OIE_FORCE:+--scheduled_force} $${OIE_DRY_RUN:+--scheduled_dry_run}

monitor-oie-health:
@[ -d "./.venv" ] && . ./.venv/bin/activate || ([ -d "./venv" ] && . ./venv/bin/activate); \
export CRE_CACHE_FILE="$${CRE_CACHE_FILE:-postgresql://cre:password@127.0.0.1:5432/cre}"; \
export PYTHONPATH="$(CURDIR)"; \
python scripts/monitor_oie_health.py --output-json "$(CURDIR)/tmp/oie-health.json"

verify-ga-parity-local:
@[ -d "./.venv" ] && . ./.venv/bin/activate || ([ -d "./venv" ] && . ./venv/bin/activate); \
export CRE_CACHE_FILE="$${CRE_CACHE_FILE:-postgresql://cre:password@127.0.0.1:5432/cre}"; \
Expand Down
33 changes: 31 additions & 2 deletions application/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,22 @@ def create_app(mode: str = "production", conf: any = None) -> Any:
letters = string.ascii_lowercase
app.secret_key = "".join(random.choice(letters) for i in range(20))

# JWT API-token signing secret: env, or mint+persist once on install/boot.
# Tests get a stable in-process default so create_app does not touch /code.
try:
from application.utils.api_tokens.secret import ensure_api_token_jwt_secret

if (
mode == "test"
and not (os.environ.get("API_TOKEN_JWT_SECRET") or "").strip()
):
os.environ["API_TOKEN_JWT_SECRET"] = (
"test-only-api-token-jwt-secret-32bytes"
)
ensure_api_token_jwt_secret()
except Exception:
logger.exception("API_TOKEN_JWT_SECRET bootstrap failed")

# config[mode].init_app(app)
sqla.init_app(app=app)
from application.web.web_main import app as app_blueprint
Expand All @@ -59,8 +75,21 @@ def create_app(mode: str = "production", conf: any = None) -> Any:

init_openapi(app)

CORS(app)
app.config["CORS_HEADERS"] = "Content-Type"
# Credentialed browser calls are same-origin in prod/staging; keep CORS
# narrow so cross-site pages cannot drive cookie auth. Admin mutations also
# require CSRF (see web_main.admin_imports_enabled_required). Without an
# explicit allowlist, flask-cors would reflect any Origin together with
# credentials, so fall back to plain (credential-less) CORS as on main.
cors_origins = [
o.strip()
for o in (os.environ.get("CORS_ALLOWED_ORIGINS") or "").split(",")
if o.strip()
]
if cors_origins:
CORS(app, origins=cors_origins, supports_credentials=True)
else:
CORS(app)
app.config["CORS_HEADERS"] = "Content-Type, X-CSRF-Token"

compress.init_app(app)
cache.init_app(app)
Expand Down
Loading
Loading