Commit Graph
1347 Commits
Author SHA1 Message Date
BaaRai 76bd0abeb1 Merge pull request #425 from joanrodriguez/feat/company-switcher
feat(web): global company switcher in the sidebar
2026-11-22 22:43:32 +01:00
BaaRai 94757c5d7e Merge pull request #487 from BaaRai/fix/ghcr-first-publish
fix(release): verify the GHCR image pulls anonymously
2026-11-22 16:17:01 +01:00
BaaRai b247c7a9d9 fix(release): verify the GHCR image pulls anonymously
v0.7.0 predates the GHCR publish step, so the quick start pointed at an image that does not exist. Document that the image starts with the next tagged release and fail the release job when an anonymous pull is denied, which also catches a brand-new private package.
2026-11-22 16:06:30 +01:00
BaaRai 565f448b58 Merge pull request #479 from BaaRai/fix/third-party-blocklist-home
fix(skill): write the third-party blocklist in the executor home
2026-11-22 11:00:46 +01:00
BaaRai e448e5fe86 fix(skill): write the third-party blocklist in the executor home
The skill told the agent to append to /app/data/third-party-blocklist.txt, but under agent isolation the data directory is not writable by the executor uid. HOME points at the executor home in both modes and is writable there. Follow-up to #417.
2026-11-22 10:50:15 +01:00
BaaRai 2bd1b71d1b Merge pull request #417 from ldevbr/contrib/third-party-approval
feat(hardening): opt-in operator approval for acquiring third-party code
2026-11-22 10:46:39 +01:00
BaaRai 177e2708cb Merge pull request #476 from BaaRai/docs/external-postgres
docs(readme): add External PostgreSQL section and Compose example (#475)
2026-11-22 10:46:33 +01:00
BaaRai ead1a126ae Merge pull request #457 from NikolayGusev-astra/feat/skill-index-in-prompt
agent: list available skills in the system prompt
2026-11-22 10:46:26 +01:00
BaaRai e11f4ba3a8 Merge pull request #468 from sresarehumantoo/test/enrich-coverage
test(enrich): add coverage tests (0% to 90.2%)
2026-11-22 10:46:20 +01:00
BaaRai 7ef1b3f08a Merge pull request #467 from sresarehumantoo/test/rewrite-coverage
test(rewrite): bring coverage to 100%
2026-11-22 10:46:13 +01:00
Joan RodriguezandClaude Opus 5.5 9734b4b743 fix(company-switcher): address review on #425
- Findings with no live asset belong to a company only through their
  task's company scope; unknown or non-numeric ids match nothing.
- Filter tasks by company on the server (GET /api/tasks?company=).
- Scope the grouped findings view, the asset tree and the stat cards.
- AND company_id outside the compiled asset DSL so OR cannot escape it.
- Add the 7 company switcher keys to tr.json and zh-CN.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWbhPFZifkVU75uaD5NYj5
2026-11-22 09:44:37 +00:00
Joan RodriguezandClaude Code 09f38c8d0b docs(changelog): company switcher entry
Co-Authored-By: Claude Code <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWbhPDnkSEFNzBXG4wDvTj
2026-11-22 09:29:57 +00:00
Joan RodriguezandClaude Code c3c8d1093e feat(web): global company switcher in the sidebar
The panel had no way to scope it to one target. Companies exist as the
ownership layer, but only the task form offered one, so a second engagement
mixed into every list.

Sidebar header, under the logo: a company picker that defaults to
"All companies" and persists per browser. Every asset-backed view follows
it — findings (all three views plus the asset tree and export), the
dashboard's finding panels, the task list, the traffic list and the assets
tabs.

Server side the switch rides on the existing ownership column: findings and
traffic take a company, and the assets list takes company_id on both the
plain and the DSL path. Findings with no live asset anchor stay visible
under their company, because they belong to no other one; the strict
subtree filter would hide them from every view.

Tests: TestFindingCompanyScopeFilter (own assets, another company, a
company with none, a nonexistent id) and TestPageHostsAllowlist. Full
./db/ ./traffic/ ./server/ pass.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWbhPDnkSEFNzBXG4wDvTj
2026-11-22 09:29:50 +00:00
BaaRai 4f6aaef02a docs(readme): drop ./skills bind mount from GHCR external PostgreSQL example (#476) 2026-11-22 10:21:20 +01:00
BaaRai 9028dfeaa9 fix(hardening): close /proc/self/environ, match agents.key, wire rulecheck_test into go test (#417) 2026-11-22 10:18:01 +01:00
Luis 264d6360cc fix(hardening): address review on the approval gate
- Priority 95-96 -> 70-72, below the built-in destructive denies (80/90/100),
  so 'pip install x && curl -X DELETE ...' still hits the DELETE deny instead of
  being downgraded to an approval (intercept.Match is priority-DESC).
- apply-intercept-rules.sh no longer sources .env as shell (code execution / $
  expansion). It reads POSTGRES_USER/DB from the postgres container's own env.
- Add a 'deny' rule for reading /app/keys, /proc/<pid>/environ and the DSN, so
  the key/DSN prohibition is enforced, not prose.
- Close named regex bypasses (pip3.12, git -c, bash -c "$(curl)", curl | tar);
  document the remaining open bypasses, the false positive, and the target-only
  limitation in the skill.
- Add hardening/rulecheck: compiles the patterns from the SQL (RE2) and asserts
  positives, closed bypasses, and documented open cases (18 cases, 0 failures).
2026-11-22 10:16:45 +01:00
Luis fff6157d39 feat(hardening): opt-in operator approval for acquiring third-party code
Add opt-in intercept rules (action ask, timeout -> deny) that pause the agent
before it downloads from code/exploit hosts, runs git clone, installs packages,
or pipes remote content into a shell, plus a third-party-code-review skill
(hash, blocklist-check, read and summarize the code before running it).

Nothing is seeded: the rules change no behavior until hardening/apply-intercept-rules.sh
is run, and code the agent writes itself is not gated -- only the point where
untrusted code enters. Regex patterns are RE2 (verified to compile); the apply
script is idempotent.
2026-11-22 10:16:45 +01:00
BaaRai 2677ff32ef docs(readme): document external PostgreSQL configuration and data/ disk usage (#475) 2026-11-22 10:14:35 +01:00
BaaRai 8bacfc0245 Merge pull request #474 from BaaRai/security/hardening-followup-462-464-465
security: follow-up hardening for the upload and capture fixes
2026-11-22 09:21:22 +01:00
BaaRai 90cd290d42 security: follow-up hardening for the upload and capture fixes
Tighten existing spill blob permissions on startup, charge 32 bytes per hook range pair, and open uploads with O_NOFOLLOW on Unix. Tests cover the startup walk, the 32-byte charge and the no-follow open.
2026-11-22 09:10:59 +01:00
BaaRai 449065aaaa Merge pull request #465 from Coff0xc/fix/upload-no-symlink
fix(server): refuse to upload through a symlink
2026-11-22 09:09:47 +01:00
BaaRai 5df46e22c1 Merge remote-tracking branch 'origin/main' into pr465
# Conflicts:
#	CHANGELOG.md
#	server/chatupload.go
2026-11-22 08:55:15 +01:00
BaaRai 83b35f844b Merge pull request #459 from Coff0xc/fix/upload-name-loop
fix(server): stop the chat upload name search when the path cannot be created
2026-11-22 08:54:03 +01:00
BaaRai 9d7983f1a2 Merge remote-tracking branch 'origin/main' into pr459
# Conflicts:
#	CHANGELOG.md
2026-11-22 08:40:44 +01:00
BaaRai 3ca8f217a3 Merge pull request #464 from Coff0xc/fix/hook-range-budget
fix(hookvm): charge range iterations against the memory budget
2026-11-22 08:40:24 +01:00
BaaRai 132af98029 Merge remote-tracking branch 'origin/main' into pr464
# Conflicts:
#	CHANGELOG.md
2026-11-22 08:30:16 +01:00
BaaRai 6ef01d4f24 Merge pull request #463 from Coff0xc/fix/asset-url-userinfo
fix(db): drop userinfo from an asset URL that cannot be parsed
2026-11-22 08:29:58 +01:00
BaaRai f72311994e Merge remote-tracking branch 'origin/main' into pr463
# Conflicts:
#	CHANGELOG.md
2026-11-22 08:17:20 +01:00
BaaRai 4171a041e6 Merge pull request #462 from Coff0xc/fix/traffic-blob-mode
fix(traffic): keep spilled capture blobs owner-only
2026-11-22 08:17:02 +01:00
BaaRai db867f63a4 Merge remote-tracking branch 'origin/main' into pr462
# Conflicts:
#	CHANGELOG.md
2026-11-22 08:06:58 +01:00
BaaRai d59227c5d4 Merge pull request #461 from Coff0xc/fix/notify-direct
fix(notify): dial notification targets directly
2026-11-22 08:06:32 +01:00
BaaRai f37d09e365 Merge remote-tracking branch 'origin/main' into pr461
# Conflicts:
#	CHANGELOG.md
2026-11-22 07:56:10 +01:00
BaaRai 5ce7ae6006 Merge pull request #458 from Coff0xc/fix/logsink-closed-subscriber
fix(server): do not send a log line to a closed subscriber
2026-11-22 07:55:33 +01:00
BaaRai 7b8be967cc Merge pull request #469 from cyberd4ch/fix/factprovenance-doc-comment
agent: attach the factProvenance doc comment to its function
2026-11-22 07:55:23 +01:00
BaaRai 09eb73c547 Merge pull request #455 from NikolayGusev-astra/fix/remove-dead-traffic-guidance
agent: remove the unused finding traffic guidance constant
2026-11-22 07:55:18 +01:00
BaaRai 43ace17ad7 Merge pull request #472 from BaaRai/feat/ghcr-compose-preset
docs(deploy): GHCR Compose preset for no-git updates
2026-11-22 07:05:17 +01:00
BaaRai 4f4bf201f7 docs(deploy): add a GHCR Compose preset for no-git updates
Adds docker-compose.ghcr.yml (same ARTEX + PostgreSQL stack from the released image, ARTEX_IMAGE_TAG, built-in skills), switches the docker run example to the component ARTEX_PG_* variables, documents pull-and-up updates without a checkout, and attaches provenance and SBOM attestations to the image build.
2026-11-22 06:52:24 +01:00
BaaRai 444bca59d5 Merge pull request #471 from mvanhorn/fix/466-ghcr-docker-release
feat: publish multi-arch Docker release image to GitHub Container Registry
2026-11-22 06:49:51 +01:00
Matt Van Horn d86b22719a feat: publish multi-arch Docker release image to GitHub Container Registry
In `.github/workflows/release.yml`, the `docker` job removes the
`DOCKERHUB_ENABLED` condition, adds `packages: write` permission, logs
in to `ghcr.io` with `GITHUB_TOKEN` on `push` events, and targets
`ghcr.io/${{ github.repository }}` while keeping Docker Hub publishing
optional when `DOCKERHUB_ENABLED` is `'true'`. Image metadata adds
`type=semver,pattern={{version}}` alongside `:latest` and the git tag,
and `docker/build-push-action` passes `ARTEX_VERSION=${{ github.ref_name
}}` for `linux/amd64` and `linux/arm64` while pushing only on `push`
events so `workflow_dispatch` runs build without pushing. Because the
image builds from the repository context without prebuilt binary
artifacts, `docker` removes the `bin-linux-*` artifact downloads and
`binaries` uploads only `bin-linux-amd64` for the `release` job's Syft
SBOM scan. `README.md` documents pulling, running, and updating
`ghcr.io/baarai/artex` alongside the checkout-based Docker Compose
setup.

Fixes #466
2026-11-21 21:11:56 -08:00
dach-a 1e7696c572 agent: move the factProvenance doc comment off the closing brace
The comment sat on the closing brace of factEvidenceLines, so Go attached it
to no declaration and godoc showed it nowhere. Noted in the review of #441.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-22 01:02:23 +00:00
SREsAreHumanToo 7af91a1281 test(enrich): add coverage tests (0% -> 90.2%)
Tests for all pure functions (extractTitle, hostOf, uniq, id0, itoa),
engine lifecycle (enqueue edge cases, cooldown, close), DNS resolution
with both real and dead-DB asset stores, HTTP probing via httptest, and
worker integration. Uses a dead-DB pattern (unreachable PG) to exercise
code paths that discard DB errors without requiring a live database.
2026-11-21 17:15:25 -05:00
SREsAreHumanToo d345fbf900 test(rewrite): cover exported API, NoteError, nil-header and status-parse edges
Adds coverage_test.go exercising the matchers_export.go wrappers
(CompileMatchers, MatchHead/MatchBody, ValidateHeaderTarget, ValidToken,
ParsePathQuery, BodyAllowedForStatus, SHA256Hex, Fingerprint,
HasConnectionHeader, splitComma/trimOWS), the Set.NoteError path, the
nil-URL and nil-header branches in Apply, parseStatus edge cases, and
the resp_headers/resp_body_regex error paths in compileMatchers.

Coverage: 89.0% -> 100.0%.
2026-11-21 17:08:23 -05:00
Coff0xc f4c7184dcc fix(server): refuse to upload through a symlink
os.Create follows a symlink, and Stat treats a dangling link as missing, so a
name planted in the uploads directory could redirect the server's write.
Destinations are now Lstat'd, a symlink is rejected, and the chat name search
treats a link as taken.
2026-11-21 19:53:50 +00:00
Coff0xc 0c55774613 fix(hookvm): charge range iterations against the memory budget
Ranging over a body or collection built the iteration list without calling
alloc, so a large body bypassed MaxMemory. The length is charged before the
loop, and the run stops with ErrMemoryLimit when it does not fit.
2026-11-21 19:53:08 +00:00
Coff0xc a133b79a0e fix(db): drop userinfo from an asset URL that cannot be parsed
normalizeURL returned the raw string when url.Parse failed, so a password in
scheme://user:password@ survived into the asset row. The authority's userinfo
is removed before that fallback.
2026-11-21 19:52:37 +00:00
Coff0xc 19110a4727 fix(traffic): keep spilled capture blobs owner-only
HTTP and raw-stream bodies written under _blobs were 0644 in a 0755
directory, so any local user could read captured traffic. New blobs are
0600 and the bucket directory is 0700. An existing blob is tightened when
it is seen again.
2026-11-21 19:52:13 +00:00
Coff0xc c8b771881e fix(notify): dial notification targets directly
Cloning the default transport kept ProxyFromEnvironment. The loopback guard
then saw the proxy address, so a link-local URL could still be fetched
through that proxy. Notifications now set Proxy to nil and connect directly.
2026-11-21 19:51:15 +00:00
Coff0xc 0eb66f4c44 fix(server): stop the chat upload name search when the path cannot be created
uniqueUploadPath treated every Stat error except "not exist" as "try the next
suffix". A name the filesystem rejects never becomes "not exist", so the
handler looped. The search now returns that error, and it also stops after
10000 existing suffixes.
2026-11-21 19:33:22 +00:00
Coff0xc 9a8f366574 fix(server): do not send a log line to a closed subscriber
Unsubscribing closes the channel after dropping it from the map. The fan-out
copied the channel and sent after releasing the lock, so the close could land
first and panic the process. The send now happens while the lock is still held.
2026-11-21 19:32:38 +00:00
BaaRai 5bed53b6ae Merge pull request #454 from BaaRai/fix/pin-go-builder-1.26.11
build: pin the Go builder image to 1.26.11 to match go.mod
2026-11-21 20:02:20 +01:00