Skip to content

Operating run skills

Run skills work out of the box once the broker can reach the factory. Three additional blocks — human.skillRecommendations, skillScan, and skills.trustedSources — are optional and off until configured.

Broker access for the Skills tab

The Skills tab and maku learning skills read a repository’s skills through the factory, using the caller’s token: they require factoryURL set on the broker. Without factoryURL, the tab and CLI commands report that skills require the factory.

A broker running in human.mode: local has no human OIDC token to forward, so it authenticates to the factory with its own service-account token:

  • Set broker.hardening.forgeRead.audience: agent-factory in the maku chart.
  • Map that principal to system:broker in the factory’s api.systemPrincipals.
  • On a cluster whose service-account issuer the factory cannot reach (such as kind or k3d), set api.systemIssuerMode: tokenreview on the factory.

The demo values set all three. Without them in local mode, the Skills tab prints which setting is missing.

Recommendations (Find more)

human.skillRecommendations (broker config) turns on Find more on the Skills tab; without it, deterministic rule cards still show (Author, draft and recommend skills).

Find more also needs the factory App mounted in the broker to check each repository’s visibility and choose the public or internal route. Without the App, every repository reads as private and Find more answers 403. When human.skillRecommendations is set, the maku chart mounts broker.factoryApp.existingSecret (agent-factory-github by default) in local mode too, so task demo needs no extra values. The chart exposes this mount via ROOMS_VISIBILITY_GITHUB_APP_DIR, arming read-only visibility checks (and the planner’s file-existence check when human.intake.plan is on) without enabling access reads, web start filing, or verdict posting (ROOMS_GITHUB_APP_DIR). A values file whose broker.extraEnv already sets either variable keeps its own mount.

Visibility reads call api.github.com on port 443. In networkPolicies.mode: cilium, the chart allows that host alone. In kubernetes mode, a NetworkPolicy cannot name a host, so the chart opens nothing by default: set broker.factoryApp.publicEgress: true (opens all public addresses on 443), switch to cilium, or add GitHub’s CIDR ranges under broker.networkPolicy.extraEgress.

KeyMeaning
urlModel gateway’s chat/completions base route (e.g. .../clients/recommender/v1)
apiKeyFileClient bearer token file, read at use
modeltier-light, tier-standard, or tier-frontier; default tier-standard
dailyPassesPasses across all repositories per UTC day; default 20
internal.enabledEnables the governed route for non-public repositories; without it, non-public repositories are refused before any model call
internal.urlGoverned model gateway base route for non-public repositories (required when internal.enabled: true)
internal.apiKeyFileBearer token file for internal.url, read at use (required when internal.enabled: true)

Skill security scan

skillScan (factory config) scans pull requests that change .agents/skills/; see The skill security scan.

KeyMeaning
enabledTurns the scan on; requires image
imageScanner image pinned by digest: name@sha256:<64 hex>
namespace, serviceAccount, runtimeClassNameWhere and as whom scan Jobs run; defaults to the factory’s namespace and maku-skill-scan
maxConcurrentCap on scan Jobs in flight, 1 to 4; default 2 (scans currently run serially, so values above 1 have no effect yet)
timeoutOne scan’s wall-clock limit, 30s to 10m; default 180s
maxInputBytesMaximum skill input bytes read per scan, up to 8 MiB; default 4 MiB
isolationcilium (default) or networkpolicy

The scan is static only (no model key). The merger App must be granted statuses: write, every repository needs merge.mergerLogin, and a branch ruleset must require maku/skill-scan from the merger App. Once skillScan.enabled: true is set, the factory requests statuses: write when minting merger App tokens, so an App missing that permission fails every merger call.

Configure skillScan under config: in the maku-factory chart with ghcr.io/smana/maku-skillspector pinned by digest:

config:
  skillScan:
    enabled: true
    image: ghcr.io/smana/maku-skillspector@sha256:<digest>
    namespace: maku-skill-scan   # recommended: dedicated namespace for scans only
    isolation: cilium            # or networkpolicy

Give scans their own namespace. The factory’s Role there lists pods and reads pod logs, and Kubernetes RBAC cannot scope those verbs to individual pods; in the factory’s own namespace it would be able to read every pod’s logs. Create the namespace before installing — the chart does not create it.

With enabled: true, the chart renders these objects in the scan namespace:

ObjectNamePurpose
ServiceAccountmaku-skill-scan (or serviceAccount)Job account: no RBAC bindings, no mounted token
Role and RoleBindingagent-factory-skill-scanGrants the factory create/get/delete Jobs, list pods, read pod logs, and get the deny policy by name; in a dedicated namespace, also create/delete ConfigMaps for scan inputs
CiliumNetworkPolicy (cilium) or NetworkPolicy (networkpolicy)maku-skill-scan-denyDenies all ingress and egress for scan pods
ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding (cluster-scoped)maku-<release-namespace>-skill-scan-jobsBounds the factory ServiceAccount to creating and deleting skill-scan-<32 hex> Jobs in the scan namespace with the scan ServiceAccount, digest-pinned images, non-root read-only containers, and configMap/emptyDir volumes only

How the scan pod is isolated

The factory refuses to start a scan unless maku-skill-scan-deny exists in the scan namespace, selects scan pods (maku.ogenki.io/skill-scan), and carries an empty egress rule set. Under the default isolation: cilium, the cluster must have Cilium CRDs installed; without them, no scan runs, every skill pull request stays pending, and each retry is logged as not_run and counted in maku_factory_skill_scans_total{outcome="not_run"}. Any scan that cannot start (missing deny policy or Kubernetes API error) posts no status so a required maku/skill-scan check stays pending while the factory retries with backoff from 1 minute doubling to 1 hour. Use isolation: networkpolicy on clusters without Cilium whose CNI enforces Kubernetes NetworkPolicy.

Because some CNIs enforce a pod’s deny policy several seconds after container start (k3s’s NetworkPolicy controller took roughly 5 s), every scan pod runs an init container first, using the same hardened scanner image with no token. The init container probes four targets in parallel (3 s timeout each): the Kubernetes API server, the pod’s nameservers on both UDP and TCP 53, the cloud metadata address (169.254.169.254:80), and a public address (1.1.1.1:443). The scan begins only after two consecutive rounds, at least 2 s apart, where all four targets are refused, unreachable, or time out. If enforcement is not observed within 30 s (about 33 s at most including the final round), the Job fails and sets maku/skill-scan to failure (job_failed): no scan runs before egress denial is observed, and none posts success.

Keep these isolation constraints in mind:

  • skillScan.timeout includes the probe wait: at the 30s floor, a slow CNI leaves no time for the scanner and the scan fails with timeout. Keep the 180s default or higher.
  • Additive NetworkPolicy rules: the probe verifies those four targets at startup only, not every address or continuous enforcement. Under isolation: networkpolicy, Kubernetes policies are additive: any other NetworkPolicy selecting scan pods (such as a namespace-wide DNS allow) opens that egress. Keep the dedicated scan namespace free of other policies selecting scan pods.
  • No service mesh injection: a mesh sidecar or ambient redirection makes probe connections succeed against the local proxy, causing every scan to fail the deny check. Keep mesh injection disabled on the scan namespace.

Trusted sources

skills.trustedSources (factory config) lists up to 8 public repositories whose skills a drafting run may adapt (Adapt a trusted source). Configure it under config: in maku-factory:

config:
  skills:
    trustedSources:
      - repo: owner/skills
        ref: main        # optional: branch or tag; default branch if empty
        path: skills     # optional: directory containing one directory per skill

Each source is pinned to a commit at draft start (names and descriptions only). Private repositories are never read; visibility is cached for 10 minutes, so a repository made private remains readable until the cache expires.

Transient read errors (GitHub 5xx or network errors) retry three times total (1 s then 2 s backoff) inside the draft’s 20 s bound. A source is pinned only after its listing and every SKILL.md are read completely. Unreachable sources stay unpinned, appear on one brief line (Trusted sources: unavailable this run (<repo>: <code>)), and are recorded in the task’s maku.ogenki.io/skill-sources-unavailable annotation. If no source lists a skill, the run drafts fresh and says so in its pull request. A retry of the task re-reads unpinned sources while keeping already-pinned commits. Sources refused by GitHub (not found, private, unknown ref, renamed repository) or rate-limited are not retried within the same draft.