Skip to content

[Nightly][sec-core] bug: agent-sec-core RPM spec missing Provides: anolisa-component(sec-core), causing install INVALID_ARGUMENT and adapter scan empty #2587

Description

@zhangtaibo

Component

sec-core (agent-sec-core RPM spec)

Bug Description

anolisa install sec-core --backend rpm --package agent-sec-core returns INVALID_ARGUMENT with the error: "component 'sec-core' is not an ANOLISA RPM component; use the ANOLISA component name and configure the repo-side component index or publish Provides: anolisa-component(sec-core)". The agent-sec-core.spec.in spec file is missing the Provides: anolisa-component(sec-core) virtual provide declaration. All other ANOLISA-managed component RPM specs (agent-memory, os-skills, tokenless, agentsight, skillfs, cosh-ng, copilot-shell) declare this provide, but agent-sec-core does not. This causes anolisa install to fail at the RPM component resolution stage (resolution.rs:rpm_package_provides_component()), leaving sec-core unregistered — and anolisa adapter scan returns no sec-core adapter.

This issue was surfaced by AgenticOS Nightly automated testing on 2026-08-16 (nightly-20260816-020035, anolisa main ba20d94) as a TEST_FAILED case.

Steps to Reproduce

# 1. Ensure agent-sec-core RPM is installed
dnf install -y agent-sec-core

# 2. Attempt to register sec-core as an ANOLISA component
anolisa --json install sec-core --backend rpm --package agent-sec-core
# Expected: ok=true, component registered
# Actual: ok=false, error.code=INVALID_ARGUMENT,
#   reason="component 'sec-core' is not an ANOLISA RPM component;
#   ... publish Provides: anolisa-component(sec-core)"

# 3. Check RPM provides — the capability is missing
rpm -q --provides agent-sec-core | grep anolisa-component
# Expected: anolisa-component(sec-core)
# Actual: (no output — provides is absent)

# 4. Run adapter scan
anolisa --json adapter scan
# Expected: adapters list includes {"component":"sec-core","framework":"openclaw",...}
# Actual: sec-core is absent from the adapters list

# 5. Verify the spec file is missing the Provides line
grep 'anolisa-component' src/agent-sec-core/agent-sec-core.spec.in
# Expected: Provides:       anolisa-component(sec-core)
# Actual: (no output)

Actual Behavior

  • anolisa --json install sec-core --backend rpm --package agent-sec-core returns ok: false, error.code: INVALID_ARGUMENT
  • rpm -q --provides agent-sec-core does not list anolisa-component(sec-core)
  • anolisa --json adapter scan returns adapters: [...] without any sec-core entry
  • /usr/share/anolisa/adapters/sec-core/ directory does not exist

Expected Behavior

The agent-sec-core.spec.in should declare Provides: anolisa-component(sec-core) so that anolisa's RPM component resolver (resolution.rs:644-668, rpm_package_provides_component()) can discover the package via what_provides_installed("anolisa-component(sec-core)"). This is the same contract followed by all other ANOLISA-managed component RPM specs:

  • agent-memory.spec.in:41Provides: anolisa-component(agent-memory)
  • os-skills.spec.in:13Provides: anolisa-component(os-skills)
  • tokenless.spec.in:33Provides: anolisa-component(tokenless)
  • agentsight.spec.in:20Provides: anolisa-component(agentsight)
  • skillfs.spec.in:26Provides: anolisa-component(skillfs)
  • cosh-ng.spec.in:21Provides: anolisa-component(cosh-ng)
  • copilot-shell.spec.in:18Provides: anolisa-component(cosh)

Root Cause

File: src/agent-sec-core/agent-sec-core.spec.in (main branch, commit ba20d94)
The spec file has no Provides: anolisa-component(sec-core) line. The ANOLISA RPM component resolver in src/anolisa/crates/anolisa-cli/src/resolution.rs:648-668 (rpm_package_provides_component) queries what_provides_installed("anolisa-component(sec-core)") — when no RPM provides this capability, it returns None, and the install command fails with INVALID_ARGUMENT.

This is a by-design omission (not a regression): the spec file was created before the anolisa-component(...) provides contract was introduced, and the declaration was never added. All other component specs were updated (PRs #1937, #1149, #1162, #2560, etc.), but agent-sec-core was missed.

Related: umbrella issue #2575 (CLOSED — covered the same root cause across 5 spec files but was closed when agent-memory PR #2560 merged; sec-core PR #2563 remains open).

Suggested Fix

--- a/src/agent-sec-core/agent-sec-core.spec.in
+++ b/src/agent-sec-core/agent-sec-core.spec.in
@@ -61,6 +61,12 @@ Requires:       agent-sec-hermes-hook = %{version}-%{release}
 Requires:       agent-sec-qwen-code-hook = %{version}-%{release}
 Requires:       agent-sec-skills = %{version}-%{release}
 
+# Declare ANOLISA component identity so that `anolisa install sec-core --backend rpm`
+# can resolve this package via RPM Provides when the repo-side components-v2.toml
+# is unavailable (404) and no package_map entry exists — the resolver falls through to
+# RPM Provides but finds no anolisa-component(sec-core) capability.
+Provides:       anolisa-component(sec-core)
+
 %description
 Agent-Sec-Core is an OS-level security baseline and hardening framework for AI Agents.
 This metapackage installs all agent-sec-core components including CLI, hooks, and skills.

Fix already implemented in PR #2563 (branch fix/agent-sec-core-missing-provides, commit d806b12a). GitHub CI verified: Build agent-sec-core RPM: SUCCESS, Test agent-sec-core: SUCCESS.

Environment

  • ALinux 4 ECS (cn-hongkong, 8.217.205.52)
  • anolisa main: ba20d94d19a73e5b781cab0c687d4034ad0d0dae
  • agent-sec-core: 0.9.0-1.alnx4 (RPM installed)
  • anolisa CLI: 0.3.1

Relevant Log Output

$ anolisa --json install sec-core --backend rpm --package agent-sec-core
{
  "ok": false,
  "schema_version": 1,
  "command": "install sec-core",
  "warnings": [],
  "error": {
    "code": "INVALID_ARGUMENT",
    "reason": "component 'sec-core' is not an ANOLISA RPM component; use the ANOLISA component name and configure the repo-side component index or publish Provides: anolisa-component(sec-core)"
  }
}

$ anolisa --json adapter scan
{
  "ok": true,
  "command": "adapter scan",
  "data": {
    "adapters": [
      {"component": "os-skills", "framework": "openclaw", ...},
      {"component": "ws-ckpt", "framework": "openclaw", ...}
    ]
  }
}
# sec-core is absent from the adapters list

Additional Context

Discovered and root-caused by AgenticOS Nightly (nightly-20260816-020035). Fix PR #2563 already open with CI green — awaiting review/merge.

Metadata

Metadata

Labels

component:sec-coresrc/agent-sec-core/priority:p1High: blocks the current release or key user experiencetype:bugA confirmed defect or incorrect behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions