Commit Graph
2344 Commits
Author SHA1 Message Date
Ed1s0nZ 3da1d22b76 docs: add REST semantics fix release record 2026-10-10 18:03:12 +08:00
Ed1s0nZ b1124fbe1e docs: record REST semantics verification and API contract 2026-10-10 18:02:52 +08:00
Ed1s0nZ 9f111a1389 fix: normalize missing deletes and empty REST lists 2026-10-10 18:02:02 +08:00
Ed1s0nZ f201397796 docs: plan REST contract regression coverage 2026-10-10 18:00:02 +08:00
Ed1s0nZ c629b08b0d docs: define REST response semantics 2026-10-10 17:59:52 +08:00
Ed1s0nZ b2b76b7193 docs: confirm REST error and empty-list requirements 2026-10-10 17:59:32 +08:00
Ed1s0nZ 35955e4740 docs: record REST semantics fix intake 2026-10-10 17:59:13 +08:00
Ed1s0nZ 68df7c1aff docs: record PR 351 review and merge to main 2026-10-10 17:35:53 +08:00
公明 2335f1b639 Merge pull request #351 from AIPentest/codex/tool-guard-conflict-detection
fix: detect concurrent interception rule edits
2026-10-10 17:34:51 +08:00
Ed1s0nZ 5d44b59c2f docs: link interception conflict fix pull request 2026-10-10 17:19:54 +08:00
Ed1s0nZ 8477bfcc74 docs: finalize interception conflict fix review record 2026-10-10 17:19:28 +08:00
Ed1s0nZ 7302c3d822 docs: record interception conflict fix verification 2026-10-10 17:18:51 +08:00
Ed1s0nZ 1ecbd4054c fix: reject stale concurrent interception rule saves 2026-10-10 17:18:13 +08:00
Ed1s0nZ 4a1d0e114e docs: plan interception conflict fix validation 2026-10-10 17:15:05 +08:00
Ed1s0nZ 23034ffa45 docs: design interception optimistic concurrency contract 2026-10-10 17:14:48 +08:00
Ed1s0nZ 7e6feeb96b docs: record authorized conflict protection requirements 2026-10-10 17:14:29 +08:00
Ed1s0nZ 65f947c9df docs: record interception conflict fix intake 2026-10-10 17:14:13 +08:00
Ed1s0nZ a8321c4bff fix(vulnerability): allow standalone manual findings and validate links 2026-10-10 16:03:42 +08:00
Ed1s0nZ 088d6da3c1 fix(rbac): revoke only affected role sessions 2026-10-10 15:42:42 +08:00
Ed1s0nZ 9e7eb2db5f docs: record Russian layout fix merge to main 2026-10-10 13:45:10 +08:00
Ed1s0nZ ab04c86459 docs: add Russian layout fix release record 2026-10-10 13:41:29 +08:00
Ed1s0nZ 6626a820d4 docs: record multilingual layout verification 2026-10-10 13:41:27 +08:00
Ed1s0nZ 132babe3a9 fix: prevent long localized dashboard labels from overflowing 2026-10-10 13:41:00 +08:00
Ed1s0nZ f6f93a1b9f docs: plan Russian overflow fix and visual checks 2026-10-10 13:37:07 +08:00
Ed1s0nZ 3889de4693 docs: design content-aware dashboard layout 2026-10-10 13:37:05 +08:00
Ed1s0nZ c356e51418 docs: define layout overflow acceptance criteria 2026-10-10 13:36:45 +08:00
Ed1s0nZ e82ee59fbb docs: record Russian layout fix intake 2026-10-10 13:36:31 +08:00
公明 8ce6281396 Update config.example.yaml v1.7.23 2026-10-10 09:45:18 +08:00
公明 e77606b58d Merge pull request #348 from Sycun/feat/vulnerability-retest
feat: add vulnerability retest branches with an isolated evidence log
2026-10-10 09:41:35 +08:00
Sycun 6a67364947 feat: add vulnerability retest branches with an isolated evidence log
Retesting a finding creates an independent conversation branch that
snapshots the source history and model trace, so verification can run
multi-turn without writing to the original session.

- POST /api/vulnerabilities/:id/retest creates the branch and persists the
  prompt, so a lost response, navigation or refresh can resume it
- new update_vulnerability_status tool closes the loop; a retest branch may
  only read and update its own finding
- {{vulnerability_id}}, {{conversation_id}} and {{source_conversation_id}}
  resolve on send, in the first turn and in follow-ups
- evidence appends to a read-only vulnerabilities.retest_log column instead
  of retest_notes: that field is operator-authored and the edit form
  rewrites it wholesale, so a routine edit used to erase the retest trail
- the retest prompt is prefilled with the operator's retest_notes, which
  already states how to verify the fix
- copied messages are re-bound as time.Time. Scanning a DATETIME column into
  a string yields RFC3339Nano while AddMessage writes the driver's
  space-separated format, and messages sort on the raw created_at text, so a
  branch rendered its new turn above the inherited history
2026-10-10 07:21:20 +08:00
公明 a3edab47f9 Merge pull request #347 from AIPentest/codex/self-update-recovery-fixes
fix: preserve stopped MCPs and reject ambiguous update recovery
2026-10-09 14:23:05 +08:00
Ed1s0nZ c215312485 docs: record corrective review and unreleased fixes 2026-10-09 14:16:23 +08:00
Ed1s0nZ 0283774799 docs: record corrective verification and recovery compatibility 2026-10-09 14:16:04 +08:00
Ed1s0nZ ff50af028f fix: keep MCP activation flags consistent across start and stop 2026-10-09 14:15:24 +08:00
Ed1s0nZ fab7e60318 fix: preserve MCP stop state and validate recovery evidence before mutation 2026-10-09 14:12:27 +08:00
Ed1s0nZ 7f5a088c61 docs: plan recovery and MCP corrective tests 2026-10-09 14:03:48 +08:00
Ed1s0nZ 54b87185e2 docs: design fail-closed recovery evidence validation 2026-10-09 14:03:40 +08:00
Ed1s0nZ 61d456c804 docs: define recovery and MCP regression acceptance 2026-10-09 14:02:46 +08:00
Ed1s0nZ 8900431bac docs: record post-merge recovery fix scope 2026-10-09 14:02:31 +08:00
公明 72cd8d62e3 Merge pull request #346 from Sycun/feat/self-update
feat: one-click update with a configurable source, restart, and self-recovery
2026-10-09 14:02:03 +08:00
Sycun a63070dbd7 docs: explain update locking and interrupted rollback recovery 2026-10-09 11:10:24 +08:00
Sycun 98de085912 fix: reconcile same-timestamp messages and close test databases 2026-10-09 11:09:22 +08:00
Sycun 07b493b91c ci: gate self-update and configuration changes on three platforms 2026-10-09 10:58:12 +08:00
Sycun b841296f0e fix: snapshot MCP configuration and make tool deadline failures consistent 2026-10-09 10:58:12 +08:00
Sycun e8a5392b37 fix: serialize installation updates and recover interrupted adoption and rollback 2026-10-09 10:58:12 +08:00
Sycun 54d8f1187d fix: preserve rollback binaries during ambiguous recovery and YAML settings 2026-10-09 10:27:17 +08:00
Sycun 36e1d9680b fix: a version write keeps the document it lands in and the mode it had
Inserting `version` above a leading `---` put it in a document of its own, so
every setting after the marker parsed as a second document and was silently
ignored: the installation came up on defaults with a config that looked intact.
Both writers - the Go one and upgrade.sh's - now insert after the document
start, and the parse-back check still refuses anything a line rewrite cannot do
safely.

upgrade.sh rewrote config.yaml through a temp file created with the process
umask, so a 0600 config came back 0644 on every package upgrade - the file
holding the API keys became group/world readable. It now creates the temp file
privately and restores the original mode before the atomic replace.

A package upgrade also deleted `.update-build-pending`, because rsync --delete
only keeps what the exclude list names: the installation forgot a compile it
still owed and the next click reported "already up to date". Every one-click
update artifact is on the keep list now, asserted against .gitignore so the
next one cannot be forgotten the same way.
2026-10-08 22:46:29 +08:00
Sycun b645914e1f fix: a rollback keeps a recreated role, and an owed build is finished first
Three ways the installation could still end up with its source, its binary and
the operator's content describing different things.

Rollback copied aside only *tracked* protected files, so a role upstream had
deleted and the operator had recreated at the same path was untracked - and
`git reset --hard` wrote the old commit's copy over it. The stash now also
covers untracked protected paths the target commit writes to, and names them in
keptContent like any other file it saved.

The pending-build marker said only "a compile is owed". An update that found
new commits therefore merged them and built the *new* tree, leaving `.prev`
holding a binary for a commit the state file no longer named - a rollback then
paired old source with the original binary. And a marker left behind after a
successful swap rebuilt and overwrote that same `.prev`. The marker now names
its target commit and the hashes on both sides of the swap, the state records
which commit the live binary came from, an owed build is finished before the
tree moves again, and a retry that finds the swap already done clears the
marker instead of repeating it. Rollback verifies that pairing before touching
anything and refuses (binary_changed) rather than reset the source beside a
binary it cannot account for; an update whose build failed never swapped one,
so its rollback moves the source only and no longer demands a `.prev`.

The version pair is recorded before the config is written, so a crash in
between still leaves a rollback that can put the old number back.
2026-10-08 22:46:17 +08:00
Sycun e8df681d9b test: keep the scripted-toolchain scenarios off windows
The four retry scenarios are driven through a scripted `go` (a POSIX shell script
placed first on PATH) and a PATH with a symlinked git. On Windows neither
harness resolves: the file would not be found through LookPath and would not
execute, and the symlink needs privileges - the tests would either fail or
silently assert nothing. They now skip there with the reason named, instead of
reporting a platform they cannot speak for. `GOOS=windows go vet ./internal/update`
compiles clean; macOS runs them for real.
2026-10-08 16:18:21 +08:00
Sycun 81bd5f1a6e fix: the version writer recognizes every spelling its reader accepts
FileVersion reads the live config with the YAML parser, which understands
`"version":` and `'version':` exactly like the bare key. WriteVersion matched
lines by the literal prefix `version`, so a legal quoted-key config was not
recognized as already carrying the field at all: instead of replacing the line,
the writer prepended a second `version:` key. The file then failed to load
("mapping key \"version\" already defined"), i.e. the version sync could leave
an installation that no longer starts - while reporting success through the
real entry point (before=v1.0.0 -> after=v1.7.22, err=nil).

The writer now matches all three spellings, top-level only, first occurrence
only, and before writing it re-reads the new text with the same YAML parser: if
the result does not parse, or the top-level version does not read back as the
target, the write is refused and the original file is left byte-for-byte alone
(the update reports the skip and stands - a stale version number is a display
problem, a config that does not load is an installation that does not start).
Forms a line-based writer cannot rewrite, like JSON one-liners and block
scalars, are refused rather than corrupted.

The tarball path's writer in upgrade.sh gets the same rule set: top-level
three-spelling matching, first match only, a refusal for block/multi-line
scalars and for duplicate keys, plus the value validation the Go side applies -
a tag with a quote or newline in it can no longer reach the live config.

Regression tests: the config package covers the three quoted spellings and the
three refused forms (JSON one-liner, block scalar, duplicate key - file must
stay untouched), and the update package drives a quoted-key live config through
a real Apply and Rollback; the latter fails on the pre-fix tree with the
duplicate key it used to produce.
2026-10-08 16:16:21 +08:00