Commit Graph

11 Commits

Author SHA1 Message Date
Oliver Kieselbach e5b0faf692 fixed combine workflow to allwow push 2026-02-28 14:10:39 +01:00
Oliver Kieselbach 1f796bf6e3 feat: externalize rules to GitHub + API consolidation + preview mode
## Rules as GitHub single source of truth
- Add 75 individual JSON rule files (2 gather, 18 analyze, 55 IME patterns)
  under rules/gather/, rules/analyze/, rules/ime-log-patterns/
- Add JSON Schemas for all three rule types with VS Code IntelliSense support
- Add CI combine script (rules/scripts/combine.js) + GitHub Action that
  validates schemas with ajv-cli and generates rules/dist/ combined files
- Convert BuiltIn*.cs from hardcoded C# objects to embedded JSON resource loaders
- Add GitHubRuleRepository service to fetch dist/ files from raw.githubusercontent.com
- Add ReseedFromGitHubFunction: POST /api/rules/reseed-from-github?type=all|gather|analyze|ime

## IME Log Patterns
- Extend ImeLogPattern model with Description and IsBuiltIn properties
- Add ImeLogPatterns table + API constants
- Add TableStorageService CRUD methods for IME log patterns
- Add ImeLogPatternService (CRUD, merge, auto-seed from embedded JSON)
- Add ImeLogPatternsFunction: GET/PUT /api/rules/ime-log-patterns (Phase 1: read-only
  for tenants, Galactic Admin can enable/disable/edit globally)
- Add IME Log Patterns management page (/ime-log-patterns)
- Wire GetAgentConfigFunction to use ImeLogPatternService instead of static class

## API route consolidation
- All rule endpoints now under /api/rules/* for single certificate exclusion path:
  /api/rules/gather, /api/rules/analyze, /api/rules/ime-log-patterns,
  /api/rules/reseed-from-github

## Export buttons
- Add per-rule and export-all JSON download buttons to gather-rules,
  analyze-rules, and ime-log-patterns pages

## Admin configuration
- Replace old individual reseed buttons with unified "Fetch & Reseed from GitHub"
  (calls new GitHub endpoint) plus compact individual-type reseed buttons
- Add CDN cache hint: GitHub raw.githubusercontent.com caches up to 5 minutes

## Preview mode
- ?preview=1 URL param seeds localStorage.previewMode (persists across navigation)
- ?preview=0 clears it; toggle in Navbar settings dropdown (indigo, eye icon)
- IME Log Patterns nav link gated behind galacticAdminMode OR previewMode
- Preview badge shown on nav link when active for normal users

## Tests
- Add xUnit test project (net8.0) with 5 tests for embedded resource loading,
  known IME actions validation, and valid categories check

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 13:12:09 +01:00
Oliver Kieselbach 306a9382f9 Update Buy Me a Coffee username in FUNDING.yml 2026-02-24 11:55:17 +01:00
Oliver Kieselbach dc30e4c9dd fix missing next platform stats url var in workflow, and fix wording in admin config 2026-02-18 12:42:11 +01:00
Oliver Kieselbach 1f1b2cf2b4 usage of EntraId ClientId harmonised 2026-02-16 18:18:42 +01:00
Oliver Kieselbach 543b574014 changed workflow to prevent unnecessary builds 2026-02-13 12:46:19 +01:00
Oliver Kieselbach 7f1637e40f Update azure-static-web-apps-brave-grass-0070b5703.yml
allow manual trigger
2026-02-10 22:49:54 +01:00
Oliver Kieselbach f09e9d1252 Update azure-static-web-apps-brave-grass-0070b5703.yml
move to vars
2026-02-10 22:39:53 +01:00
Oliver Kieselbach 8520287305 Update azure-static-web-apps-brave-grass-0070b5703.yml
added next urls
2026-02-10 22:29:52 +01:00
Oliver Kieselbach db6ea63489 Fix YAML formatting for Azure Static Web Apps workflow
fix api_location... must be "" as I'm using my own functions app
2026-02-10 20:17:21 +01:00
Oliver Kieselbach 8811b81c28 ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com
2026-02-10 20:13:51 +01:00