Iwe platform redteam

From TserenTserenov/FMT-exocortex-template · View interactive version

Iwe platform redteam is an AI agent skill from the GitHub repository TserenTserenov/FMT-exocortex-template. Product-only Red Team audit of the FMT/IWE platform: source, manifests, setup/update paths, CI and release provenance, agent permissions and memory, hooks, runtime, roles, schedulers, Day Open/Close, and regression claims. Use before merging or publishing a release, after changes to updater/runtime/

How to use this skill

Skill file

IWE Platform Red Team

Audit the product as an adversary trying to disprove its release, upgrade, safety, and runtime claims. Do not use earlier incidents as proof: rebuild the case from the exact current artifact.

IWE Integration Contract (read first)

Эта секция — обёртка IWE поверх методики Евгения ниже. Дополнение Ф19 к

Finding Contract и Final Output требует для существенной находки исполняемую

проверку или явно принятую оговорку; остальная методика сохранена.

платформенного хука границы (PreToolUse guard уровня платформы) этот скилл

запускается только под пилотом, не в фоновом/headless-режиме. Разрушительные

шаги (rollback/freeze/mix-and-match/updater-мутации) не выполнять автономно.

FMT-exocortex-template; операционный аудит использует его версию из

проверяемого коммита шаблона.

операцию (setup/update/hook/scheduler/mutation) запускать как

bash .../boundary-guard.sh -- <command>. Обёртка отказывает, если цель не

одноразовая фикстура под temp, и очищает унаследованные IWE_*/WORKSPACE_DIR

для каждой команды. Простой предварительный вызов guard без -- недостаточен:

он не очистит окружение последующих команд.

ставит в начало PATH свои отказывающие заглушки для доступных

launchctl/systemctl/crontab и возвращает BLOCKED, даже если дочерний

скрипт подавил ошибку. Обновление через настоящий релизный канал по-прежнему

проверяет доставку файлов и хеши; оно не подтверждает активацию служб.

Явные пути к менеджерам внутри произвольного дочернего скрипта и замена им

PATH остаются вне гарантий shell-обёртки: для общей изоляции нужна VM или

системная песочница. Не запускать такую пробу на хосте без неё.

кандидате прогнать себя по герметичным фикстурам tests/run-calibration.sh:

fixtures/known-bad-release обязан получить BLOCKED, fixtures/known-good-release

— GO. Если плохой проходит или хороший блокируется — методика в этой среде

сломана, реальный вердикт не выдавать (cannot_verify). Калибровка герметична:

она не зависит от состояния реальных required-checks проекта и использует

синтетическую зелёную квитанцию внутри фикстуры.

таблицы находок) — английский, как во всём продукт-репо (технический канал).

Одну итоговую строку решения пилоту в чат отдавать по-русски (канал-детектор

DP.SC.050): «Публиковать безопасно / Публиковать нельзя — <причина>».

runbook состязательного аудита (open-loop, слой «интеллект»). Каждая

существенная подтверждённая находка требует исполняемой проверки в продукте

или явно принятой оговорки по Finding Contract ниже; ждать повторения дефекта

не нужно. «Скилл установлен» ≠ «платформа защищена».

уровня протокола верификации релиза FMT-шаблона (VR.SC.006, слой 5).

Scope Boundary

Safety Contract

Route the Audit

Read only the references required for the claim:

  1. Release, PR, manifest, announcement, or updater: read release-and-update.md and ci-and-supply-chain.md.
  2. Fresh install, upgrade, self-update, migration, or portability: read install-and-upgrade-matrix.md.
  3. Agent, skill, hook, tool, memory, approval, or multi-agent behavior: read agentic-security.md.
  4. Day Open/Close, extensions, roles, Python, launchd/systemd, cron, or observable runtime: read runtime-and-integrations.md.
  5. Reported defect or regression claim: also read adversarial-cases.md.
  6. Final verdict or release decision: read evidence-and-reporting.md.
  7. Methodology review or refresh: read methodology-sources.md.

Mandatory Workflow

0. Calibrate (IWE, before anything else)

Run bash tests/run-calibration.sh. Two legs:

  1. Boundary guard (production safety code) — must refuse real / non-temp /

workspace-nested targets and must redirect HOME/WORKSPACE_DIR into the

fixture. A failure here means destructive steps could reach a real workspace:

stop, do not run any behaviour test.

  1. Environment + integrity contract (smoke-test) — confirms shasum/cp

behave here and that the deterministic manifest-integrity check marks the

known-good fixture GO and the tampered known-bad fixture BLOCKED_HASH.

This validates the environment and the integrity contract, not the

LLM-driven audit reasoning of the runbook below — that is your responsibility

per the workflow, the classifier does not stand in for it.

Any failing leg → stop and report cannot_verify; do not audit the real target.

1. Freeze the Claim

Write the exact statement under test, expected user-visible outcome, supported platforms, install mode, assets, trust boundaries, abuse cases, and pass/fail criteria. Do not begin with a suspected diagnosis.

2. Pin the Artifact

Record the audit time and independently identify:

A moving branch, version string, PR body, announcement, or green badge is not an immutable artifact identity.

3. Map the Delivery and Control Flow

Trace every relevant path end to end:

source or generator
  -> manifest and ownership
  -> setup / update / migration
  -> installed target
  -> consumer lookup
  -> runtime or scheduler
  -> user-visible postcondition

For agent actions also trace:

untrusted input
  -> instructions / memory / model decision
  -> tool authorization and approval
  -> execution boundary
  -> validation, logging, rollback, and user-visible result

4. Build Disposable Projections

Use separate fixtures for:

Do not let a full source checkout silently provide excluded fixtures, defaults, tests, or libraries to an installed-product test. Run every dangerous command through boundary-guard.sh -- <command>.

5. Run Positive and Negative Controls

Verify the documented success path, then attack the proof. At minimum test:

A regression test that also passes against the buggy implementation is false-green.

6. Audit the Exact CI Receipt

Inspect critical job logs, conditions, shell/OS identity, test names and counts, skipped steps, continue-on-error, SKIP, and XFAIL. Verify that release gates ran on the exact final tree and that downstream publish/announcement steps cannot run after a failed prerequisite.

7. Prove the Installed Behavior

Repository presence is not delivery. Run the installed consumer from its documented entry point and assert the final state, exit status, generated artifact, safety decision, scheduler result, and truthful diagnostics.

8. Contradiction Pass

Before concluding, try to reverse every material finding:

Refresh mutable remote identities immediately before the verdict.

Verdict Contract

Never lower a verdict because a deadline is near, several unrelated jobs are green, or a workaround exists.

После вердикта — одна строка пилоту в чат по-русски: «Публиковать безопасно (<тег>)» / «Публиковать нельзя — <главная причина>» / «Не удалось проверить — <чего не хватает>».

Finding Contract

For every material finding record:

test plus its failing bad-artifact/mutation and passing candidate evidence;

alternatively an exception explicitly accepted by the product owner or a

designated release approver who is not the finding author. Record that

person's decision with a permanent issue, PR, or decision-record link,

scope, reason, and re-review trigger. Without the decision and link the

exception is only proposed, and the finding remains open even if the audit

report is complete. An exception does not turn an unproven required release

gate into PASS.

for each one, including a proposed exception. The audit reminder is not its

tracker. Do not close the reminder until every unresolved material finding

has that durable open issue and the audit result links to it.

Use cannot_verify instead of inference when isolation, access, or evidence is missing.

Final Output

Lead with the human release decision, then use:

## Verdict
GO / CAUTION / BLOCKED — exact tag/SHA and audit time

## Required Gates
| Gate | Result | Exact evidence |

## Findings
| ID | Severity | Contract | Evidence | Impact | Owner | Confidence | Falsifier | Executable check or exception decision link | Open issue if unresolved |

## Release Boundary
- Safe to publish/use:
- Not proven or blocked:
- Required before re-review:

## Regression Receipt
- fixed candidate:
- known-bad or mutation control:
- installed projection:
- supported OS/shell matrix:
- second-run/idempotency:
- per-finding executable check or exception decision link:
- separate open issue for each unresolved material finding:

Report skipped and unavailable checks explicitly. Do not bury a blocker below secondary observations.

<!-- USER-SPACE -->

<!-- /USER-SPACE -->

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.