The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
feat(store): add Trail of Bits Skills, a security-audit harness
maxc35db61a9335
diff --git a/.github/assets/store/workshop-overview.svg b/.github/assets/store/workshop-overview.svgindex 864bfb642..723762c6a 100644--- a/.github/assets/store/workshop-overview.svg+++ b/.github/assets/store/workshop-overview.svg@@ -1,5 +1,5 @@<svg xmlns="http://www.w3.org/2000/svg" width="1280" height="1454" viewBox="0 0 1280 1454" role="img" aria-labelledby="title desc">-<title id="title">OpenHarness: coding first, then 49 harnesses across 10 more categories</title>+<title id="title">OpenHarness: coding first, then 50 harnesses across 10 more categories</title><desc id="desc">Coding is the main category, with fourteen supported agents. Below it, harnesses for Design, Engineering, Media, Music, Productivity, Science and Data, Simulation, Games, Research, and Local AI. The full catalog is in the README table.</desc><style>text{font-family:Inter,Arial,sans-serif;fill:#172a24}</style><rect width="1280" height="1454" rx="26" fill="#f3f2ec"/>diff --git a/README.md b/README.mdindex 37d42378f..f7f35e4d1 100644--- a/README.md+++ b/README.md@@ -229,11 +229,11 @@ The agent does the reasoning. The harness supplies the tools and the view. It's`harness.json`, so adding a craft never touches the app.<!-- store-catalog:start -->-### 49 harnesses in the Store+### 50 harnesses in the Store| Category | Agents and harnesses ||---|---|-| **Coding** | [Claude Code, Codex, Cursor, OpenCode, Pi, Hermes, Command Code, Devin, Muse Code, Amp, Antigravity, GitHub Copilot, Grok Build, Kilo Code](docs/engines.md), [Harness Monitor](store/agents/harness-monitor/), [Machine Monitor](store/agents/machine-monitor/) |+| **Coding** | [Claude Code, Codex, Cursor, OpenCode, Pi, Hermes, Command Code, Devin, Muse Code, Amp, Antigravity, GitHub Copilot, Grok Build, Kilo Code](docs/engines.md), [Harness Monitor](store/agents/harness-monitor/), [Machine Monitor](store/agents/machine-monitor/), [Trail of Bits Skills](store/agents/trailofbits-skills/) || Design | [Autonomous Workshop](store/agents/autonomous-workshop/), [Blender](store/agents/blender/), [Bonsai MCP](store/agents/bonsai-mcp/), [Creative Direction](store/agents/creative-direction/), [Excalidraw](store/agents/excalidraw/), [FreeCAD](store/agents/freecad/), [Generative Art](store/agents/generative-art/), [OpenSCAD](store/agents/openscad/), [text-to-cad](store/agents/text-to-cad/) || Engineering | [Autonomous Circuit](store/agents/autonomous-circuit/), [CircuitJS](store/agents/circuitjs/), [Home Assistant](store/agents/home-assistant/), [KiCad](store/agents/kicad/), [Orca Slicer](store/agents/orca-slicer/), [Yosys](store/agents/yosys/) || Media | [Comfy MCP](store/agents/comfy-mcp/), [Manim](store/agents/manim/), [OpenMontage](store/agents/openmontage/), [Remotion](store/agents/remotion/) |diff --git a/desktop/assets/engine-icons/NOTICE.txt b/desktop/assets/engine-icons/NOTICE.txtindex 3ed9d03e6..23a6a024b 100644--- a/desktop/assets/engine-icons/NOTICE.txt+++ b/desktop/assets/engine-icons/NOTICE.txt@@ -116,6 +116,11 @@ autonomous/simskillLicense: MITSource: https://github.com/autonomous-ai/openharness/blob/main/store/branding/simskill.svg+autonomous/trailofbits-skills+© 2026 OpenHarness contributors+License: MIT+Source: https://github.com/autonomous-ai/openharness/blob/main/store/branding/trailofbits-skills.svg+autonomous/harness-monitor© 2026 OpenHarness contributorsLicense: MITdiff --git a/desktop/assets/engine-icons/trailofbits-skills.png b/desktop/assets/engine-icons/trailofbits-skills.pngnew file mode 100644index 000000000..d48624236Binary files /dev/null and b/desktop/assets/engine-icons/trailofbits-skills.png differdiff --git a/desktop/assets/store/README.md b/desktop/assets/store/README.mdindex 015754cc4..d7e706f03 100644--- a/desktop/assets/store/README.md+++ b/desktop/assets/store/README.md@@ -147,6 +147,7 @@ screenshots, with the corresponding software notices preserved.| `covers/orca-slicer.jpg` | `store/showcase/orca-slicer/review.jpg` || `covers/score.jpg` | `store/showcase/score/ensemble.jpg` || `covers/yosys.jpg` | `store/showcase/yosys/fibonacci-cpu.jpg` |+| `covers/trailofbits-skills.jpg` | `store/showcase/trailofbits-skills/nodegoat-audit.jpg` |For wrapped tools with no useful published artwork, the cover shows an original projectoutput or Harness's own viewer. For example, Godogen's upstream thumbnail is a text titlediff --git a/desktop/assets/store/covers/sources.json b/desktop/assets/store/covers/sources.jsonindex c2edd3fda..93b1c6d9b 100644--- a/desktop/assets/store/covers/sources.json+++ b/desktop/assets/store/covers/sources.json@@ -395,5 +395,12 @@"credit": "OpenHarness example","sha256": "d0656e998e639c26013d26ef671e5e661bfc35bad5f5b2445f7c589908cf30f8","harness": "autonomous/yosys"+ },+ {+ "asset": "trailofbits-skills.jpg",+ "source": "store/showcase/trailofbits-skills/nodegoat-audit.jpg",+ "credit": "OpenHarness example",+ "sha256": "6b9deb00f2c2b0568b0e903b93bd86afc149eef135a81a7a4d0873ce9ca46ad0",+ "harness": "autonomous/trailofbits-skills"}]diff --git a/desktop/assets/store/covers/trailofbits-skills.jpg b/desktop/assets/store/covers/trailofbits-skills.jpgnew file mode 100644index 000000000..52b691e0eBinary files /dev/null and b/desktop/assets/store/covers/trailofbits-skills.jpg differdiff --git a/desktop/lib/store/store_categories.g.dart b/desktop/lib/store/store_categories.g.dartindex c00ed50a5..1409be9bd 100644--- a/desktop/lib/store/store_categories.g.dart+++ b/desktop/lib/store/store_categories.g.dart@@ -1,7 +1,7 @@// Generated from store/browse-categories.json by store/tools/presentation.mjs.// Run that generator after changing the taxonomy; do not edit this file.const storeCategoryDomains = <String, Set<String>>{- 'Coding': {'Code', 'Compute', 'Web'},+ 'Coding': {'Code', 'Compute', 'Web', 'Security'},'Design': {'3D', 'CAD', 'Architecture', 'Diagrams', 'Design', 'Original art'},'Engineering': {'PCB', 'Circuits', 'Chips', 'Fabrication', 'Firmware', 'Automation', 'Home automation'},'Media': {'Video', 'Math animation', 'Generative media'},diff --git a/desktop/lib/store/store_cover_art.dart b/desktop/lib/store/store_cover_art.dartindex 632a97c41..eb30a9869 100644--- a/desktop/lib/store/store_cover_art.dart+++ b/desktop/lib/store/store_cover_art.dart@@ -342,6 +342,13 @@ const storeCoverArt = <String, StoreCoverArt>{imageSize: Size(1600, 1100),viewport: Rect.fromLTWH(112, 280, 992, 671),),+ 'autonomous/trailofbits-skills': StoreCoverArt(+ asset: 'assets/store/covers/trailofbits-skills.jpg',+ description: 'A Trail of Bits Skills audit report on OWASP NodeGoat',+ imageSize: Size(1600, 1000),+ viewport: Rect.fromLTWH(340, 20, 920, 557),+ background: Color(0xff16181c),+ ),'autonomous/yosys': StoreCoverArt(asset: 'assets/store/covers/yosys.jpg',description: 'Timing traces from a CPU built with Yosys',diff --git a/desktop/lib/widgets/engine_identity.dart b/desktop/lib/widgets/engine_identity.dartindex 2396fdbaf..6256361f1 100644--- a/desktop/lib/widgets/engine_identity.dart+++ b/desktop/lib/widgets/engine_identity.dart@@ -607,6 +607,17 @@ const _harnesses = <String, EngineIdentity>{color: Color(0xffb5d9ae),asset: 'assets/engine-icons/godogen.png',),+ // An original package mark (a shield with code under a lens), not Trail of+ // Bits' own logo: the wrapper loads their plugins, it does not wear their brand.+ 'autonomous/trailofbits-skills': EngineIdentity(+ id: 'autonomous/trailofbits-skills',+ label: 'Trail of Bits Skills',+ category: 'Security',+ tagline: 'Skills to enhance AI-assisted security analysis and testing',+ creator: 'Trail of Bits',+ color: Color(0xff7fd1c7),+ asset: 'assets/engine-icons/trailofbits-skills.png',+ ),// Of the eight studios of 2026-09-18, three wear their project's own mark —// Comfy's `assets/logo.svg`, Dimensional's favicon, Bonsai's desktop icon// from IfcOpenShell. The other five (Ableton AI, autoresearch-mlx,@@ -791,6 +802,7 @@ const knownHarnessBase = <String, String>{'autonomous/roundtable': 'claude','autonomous/jev-browser': 'claude','autonomous/godogen': 'claude',+ 'autonomous/trailofbits-skills': 'claude','autonomous/ollama': 'codex','autonomous/mlx-lm': 'codex','autonomous/vllm': 'codex',diff --git a/store/agents/trailofbits-skills/.gitignore b/store/agents/trailofbits-skills/.gitignorenew file mode 100644index 000000000..3b96ad7be--- /dev/null+++ b/store/agents/trailofbits-skills/.gitignore@@ -0,0 +1,7 @@+# What setup writes into this package on a linked install — never source.+upstream/+.venv/+bin/+node_modules/+browsers/+__pycache__/diff --git a/store/agents/trailofbits-skills/AGENTS.md b/store/agents/trailofbits-skills/AGENTS.mdnew file mode 100644index 000000000..e61b36b8c--- /dev/null+++ b/store/agents/trailofbits-skills/AGENTS.md@@ -0,0 +1,45 @@+# Trail of Bits Skills, running inside Harness++You are Claude Code in a terminal that Harness opened for a **security audit**. The codebase to audit+is this folder — or, when the folder is empty, a repository the person names, which you clone into+`target/`. You audit it with Trail of Bits' own skills, linked into this session exactly as they+wrote them; the `trailofbits-harness` skill says how their sub-agents and scripts run here. Beside+this terminal Harness has opened the **report pane**: `security-audit/index.html`, rebuilt from your+findings every time you run `"$TOB_REPORT"`. You never start a server or open a browser for it.++Read the `trailofbits-harness` skill first: the findings format, the phase map, and the plugin+features (plugin root, named sub-agents, Workflow scripts, fp-check's gates) as provided here.++## Rules that are not negotiable++- **Read, do not run.** Never execute the audited code, its build, its tests, its install scripts or+ its package manager's install hooks, unless the person asks for exactly that. Static tools+ (Semgrep, pip-audit reading a lockfile, CodeQL when present) are how you look.+- **Touch nothing outside `security-audit/`** (and `target/` when you cloned it). An audit does not+ fix, reformat or commit the code it reviews; recommendations go in the report.+- **Nothing leaves this machine.** Every `semgrep` runs with `--metrics=off` (the environment also+ sets `SEMGREP_SEND_METRICS=off`), never `--config auto`. Do not paste the code into web services.+- **No live targets.** Proofs of concept are written into `security-audit/poc/`, run only locally and+ only when the person agrees, and never against a system you do not control.+- **Secrets are reported by location, never copied.** Redact all but the first four characters.++## Where things are++- `security-audit/findings.json` — the audit's one source of truth; you edit it.+- `security-audit/index.html`, `report.md`, `report.pdf` — generated by `"$TOB_REPORT"`; never edit.+- `.harness/verdict.json` — the pane header, generated from findings.json; never edit.+- The tools: `PATH="$TOB_BIN:$PATH" semgrep …` (also `pip-audit`, `uv`, `python3`). The plugins'+ own files — agents, scripts, workflows — are under `$TOB_SKILLS/plugins/`.++## How to work: the report fills in while you audit++1. **Scope, in the first minutes.** Name the target, record `git rev-parse HEAD`, agree the scope+ paths in one question if they are not obvious, set `phase` to `context`, run `"$TOB_REPORT"`.+2. **Then walk the phases** the skill maps out — context, scan, review, verify — moving `phase` as+ you go and adding each candidate to findings.json as `unverified` the moment you have one.+ Run `"$TOB_REPORT"` after every change: the person reads the pane, not the scrollback.+3. **Verify before you believe.** Every finding goes through `fp-check` and ends `confirmed` or+ `false-positive` with the reason in its evidence. The report is not final while anything is+ `unverified`.+4. **Deliver**: write the summary, set `phase` to `report` and `final` to true, run+ `"$TOB_REPORT" --pdf`, and say where `report.md` and `report.pdf` are.diff --git a/store/agents/trailofbits-skills/LICENSE b/store/agents/trailofbits-skills/LICENSEnew file mode 100644index 000000000..a499cd17e--- /dev/null+++ b/store/agents/trailofbits-skills/LICENSE@@ -0,0 +1,21 @@+MIT License++Copyright (c) 2026 Autonomous, Inc.++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.diff --git a/store/agents/trailofbits-skills/LICENSE-trailofbits b/store/agents/trailofbits-skills/LICENSE-trailofbitsnew file mode 100644index 000000000..3b7b82d0d--- /dev/null+++ b/store/agents/trailofbits-skills/LICENSE-trailofbits@@ -0,0 +1,427 @@+Attribution-ShareAlike 4.0 International++=======================================================================++Creative Commons Corporation ("Creative Commons") is not a law firm and+does not provide legal services or legal advice. Distribution of+Creative Commons public licenses does not create a lawyer-client or+other relationship. Creative Commons makes its licenses and related+information available on an "as-is" basis. Creative Commons gives no+warranties regarding its licenses, any material licensed under their+terms and conditions, or any related information. Creative Commons+disclaims all liability for damages resulting from their use to the+fullest extent possible.++Using Creative Commons Public Licenses++Creative Commons public licenses provide a standard set of terms and+conditions that creators and other rights holders may use to share+original works of authorship and other material subject to copyright+and certain other rights specified in the public license below. The+following considerations are for informational purposes only, are not+exhaustive, and do not form part of our licenses.++ Considerations for licensors: Our public licenses are+ intended for use by those authorized to give the public+ permission to use material in ways otherwise restricted by+ copyright and certain other rights. Our licenses are+ irrevocable. Licensors should read and understand the terms+ and conditions of the license they choose before applying it.+ Licensors should also secure all rights necessary before+ applying our licenses so that the public can reuse the+ material as expected. Licensors should clearly mark any+ material not subject to the license. This includes other CC-+ licensed material, or material used under an exception or+ limitation to copyright. More considerations for licensors:+ wiki.creativecommons.org/Considerations_for_licensors++ Considerations for the public: By using one of our public+ licenses, a licensor grants the public permission to use the+ licensed material under specified terms and conditions. If+ the licensor's permission is not necessary for any reason--for+ example, because of any applicable exception or limitation to+ copyright--then that use is not regulated by the license. Our+ licenses grant only permissions under copyright and certain+ other rights that a licensor has authority to grant. Use of+ the licensed material may still be restricted for other+ reasons, including because others have copyright or other+ rights in the material. A licensor may make special requests,+ such as asking that all changes be marked or described.+ Although not required by our licenses, you are encouraged to+ respect those requests where reasonable. More_considerations+ for the public:+ wiki.creativecommons.org/Considerations_for_licensees++=======================================================================++Creative Commons Attribution-ShareAlike 4.0 International Public+License++By exercising the Licensed Rights (defined below), You accept and agree+to be bound by the terms and conditions of this Creative Commons+Attribution-ShareAlike 4.0 International Public License ("Public+License"). To the extent this Public License may be interpreted as a+contract, You are granted the Licensed Rights in consideration of Your+acceptance of these terms and conditions, and the Licensor grants You+such rights in consideration of benefits the Licensor receives from+making the Licensed Material available under these terms and+conditions.+++Section 1 -- Definitions.++ a. Adapted Material means material subject to Copyright and Similar+ Rights that is derived from or based upon the Licensed Material+ and in which the Licensed Material is translated, altered,+ arranged, transformed, or otherwise modified in a manner requiring+ permission under the Copyright and Similar Rights held by the+ Licensor. For purposes of this Public License, where the Licensed+ Material is a musical work, performance, or sound recording,+ Adapted Material is always produced where the Licensed Material is+ synched in timed relation with a moving image.++ b. Adapter's License means the license You apply to Your Copyright+ and Similar Rights in Your contributions to Adapted Material in+ accordance with the terms and conditions of this Public License.++ c. BY-SA Compatible License means a license listed at+ creativecommons.org/compatiblelicenses, approved by Creative+ Commons as essentially the equivalent of this Public License.++ d. Copyright and Similar Rights means copyright and/or similar rights+ closely related to copyright including, without limitation,+ performance, broadcast, sound recording, and Sui Generis Database+ Rights, without regard to how the rights are labeled or+ categorized. For purposes of this Public License, the rights+ specified in Section 2(b)(1)-(2) are not Copyright and Similar+ Rights.++ e. Effective Technological Measures means those measures that, in the+ absence of proper authority, may not be circumvented under laws+ fulfilling obligations under Article 11 of the WIPO Copyright+ Treaty adopted on December 20, 1996, and/or similar international+ agreements.++ f. Exceptions and Limitations means fair use, fair dealing, and/or+ any other exception or limitation to Copyright and Similar Rights+ that applies to Your use of the Licensed Material.++ g. License Elements means the license attributes listed in the name+ of a Creative Commons Public License. The License Elements of this+ Public License are Attribution and ShareAlike.++ h. Licensed Material means the artistic or literary work, database,+ or other material to which the Licensor applied this Public+ License.++ i. Licensed Rights means the rights granted to You subject to the+ terms and conditions of this Public License, which are limited to+ all Copyright and Similar Rights that apply to Your use of the+ Licensed Material and that the Licensor has authority to license.++ j. Licensor means the individual(s) or entity(ies) granting rights+ under this Public License.++ k. Share means to provide material to the public by any means or+ process that requires permission under the Licensed Rights, such+ as reproduction, public display, public performance, distribution,+ dissemination, communication, or importation, and to make material+ available to the public including in ways that members of the+ public may access the material from a place and at a time+ individually chosen by them.++ l. Sui Generis Database Rights means rights other than copyright+ resulting from Directive 96/9/EC of the European Parliament and of+ the Council of 11 March 1996 on the legal protection of databases,+ as amended and/or succeeded, as well as other essentially+ equivalent rights anywhere in the world.++ m. You means the individual or entity exercising the Licensed Rights+ under this Public License. Your has a corresponding meaning.+++Section 2 -- Scope.++ a. License grant.++ 1. Subject to the terms and conditions of this Public License,+ the Licensor hereby grants You a worldwide, royalty-free,+ non-sublicensable, non-exclusive, irrevocable license to+ exercise the Licensed Rights in the Licensed Material to:++ a. reproduce and Share the Licensed Material, in whole or+ in part; and++ b. produce, reproduce, and Share Adapted Material.++ 2. Exceptions and Limitations. For the avoidance of doubt, where+ Exceptions and Limitations apply to Your use, this Public+ License does not apply, and You do not need to comply with+ its terms and conditions.++ 3. Term. The term of this Public License is specified in Section+ 6(a).++ 4. Media and formats; technical modifications allowed. The+ Licensor authorizes You to exercise the Licensed Rights in+ all media and formats whether now known or hereafter created,+ and to make technical modifications necessary to do so. The+ Licensor waives and/or agrees not to assert any right or+ authority to forbid You from making technical modifications+ necessary to exercise the Licensed Rights, including+ technical modifications necessary to circumvent Effective+ Technological Measures. For purposes of this Public License,+ simply making modifications authorized by this Section 2(a)+ (4) never produces Adapted Material.++ 5. Downstream recipients.++ a. Offer from the Licensor -- Licensed Material. Every+ recipient of the Licensed Material automatically+ receives an offer from the Licensor to exercise the+ Licensed Rights under the terms and conditions of this+ Public License.++ b. Additional offer from the Licensor -- Adapted Material.+ Every recipient of Adapted Material from You+ automatically receives an offer from the Licensor to+ exercise the Licensed Rights in the Adapted Material+ under the conditions of the Adapter's License You apply.++ c. No downstream restrictions. You may not offer or impose+ any additional or different terms or conditions on, or+ apply any Effective Technological Measures to, the+ Licensed Material if doing so restricts exercise of the+ Licensed Rights by any recipient of the Licensed+ Material.++ 6. No endorsement. Nothing in this Public License constitutes or+ may be construed as permission to assert or imply that You+ are, or that Your use of the Licensed Material is, connected+ with, or sponsored, endorsed, or granted official status by,+ the Licensor or others designated to receive attribution as+ provided in Section 3(a)(1)(A)(i).++ b. Other rights.++ 1. Moral rights, such as the right of integrity, are not+ licensed under this Public License, nor are publicity,+ privacy, and/or other similar personality rights; however, to+ the extent possible, the Licensor waives and/or agrees not to+ assert any such rights held by the Licensor to the limited+ extent necessary to allow You to exercise the Licensed+ Rights, but not otherwise.++ 2. Patent and trademark rights are not licensed under this+ Public License.++ 3. To the extent possible, the Licensor waives any right to+ collect royalties from You for the exercise of the Licensed+ Rights, whether directly or through a collecting society+ under any voluntary or waivable statutory or compulsory+ licensing scheme. In all other cases the Licensor expressly+ reserves any right to collect such royalties.+++Section 3 -- License Conditions.++Your exercise of the Licensed Rights is expressly made subject to the+following conditions.++ a. Attribution.++ 1. If You Share the Licensed Material (including in modified+ form), You must:++ a. retain the following if it is supplied by the Licensor+ with the Licensed Material:++ i. identification of the creator(s) of the Licensed+ Material and any others designated to receive+ attribution, in any reasonable manner requested by+ the Licensor (including by pseudonym if+ designated);++ ii. a copyright notice;++ iii. a notice that refers to this Public License;++ iv. a notice that refers to the disclaimer of+ warranties;++ v. a URI or hyperlink to the Licensed Material to the+ extent reasonably practicable;++ b. indicate if You modified the Licensed Material and+ retain an indication of any previous modifications; and++ c. indicate the Licensed Material is licensed under this+ Public License, and include the text of, or the URI or+ hyperlink to, this Public License.++ 2. You may satisfy the conditions in Section 3(a)(1) in any+ reasonable manner based on the medium, means, and context in+ which You Share the Licensed Material. For example, it may be+ reasonable to satisfy the conditions by providing a URI or+ hyperlink to a resource that includes the required+ information.++ 3. If requested by the Licensor, You must remove any of the+ information required by Section 3(a)(1)(A) to the extent+ reasonably practicable.++ b. ShareAlike.++ In addition to the conditions in Section 3(a), if You Share+ Adapted Material You produce, the following conditions also apply.++ 1. The Adapter's License You apply must be a Creative Commons+ license with the same License Elements, this version or+ later, or a BY-SA Compatible License.++ 2. You must include the text of, or the URI or hyperlink to, the+ Adapter's License You apply. You may satisfy this condition+ in any reasonable manner based on the medium, means, and+ context in which You Share Adapted Material.++ 3. You may not offer or impose any additional or different terms+ or conditions on, or apply any Effective Technological+ Measures to, Adapted Material that restrict exercise of the+ rights granted under the Adapter's License You apply.+++Section 4 -- Sui Generis Database Rights.++Where the Licensed Rights include Sui Generis Database Rights that+apply to Your use of the Licensed Material:++ a. for the avoidance of doubt, Section 2(a)(1) grants You the right+ to extract, reuse, reproduce, and Share all or a substantial+ portion of the contents of the database;++ b. if You include all or a substantial portion of the database+ contents in a database in which You have Sui Generis Database+ Rights, then the database in which You have Sui Generis Database+ Rights (but not its individual contents) is Adapted Material,++ including for purposes of Section 3(b); and+ c. You must comply with the conditions in Section 3(a) if You Share+ all or a substantial portion of the contents of the database.++For the avoidance of doubt, this Section 4 supplements and does not+replace Your obligations under this Public License where the Licensed+Rights include other Copyright and Similar Rights.+++Section 5 -- Disclaimer of Warranties and Limitation of Liability.++ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.++ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.++ c. The disclaimer of warranties and limitation of liability provided+ above shall be interpreted in a manner that, to the extent+ possible, most closely approximates an absolute disclaimer and+ waiver of all liability.+++Section 6 -- Term and Termination.++ a. This Public License applies for the term of the Copyright and+ Similar Rights licensed here. However, if You fail to comply with+ this Public License, then Your rights under this Public License+ terminate automatically.++ b. Where Your right to use the Licensed Material has terminated under+ Section 6(a), it reinstates:++ 1. automatically as of the date the violation is cured, provided+ it is cured within 30 days of Your discovery of the+ violation; or++ 2. upon express reinstatement by the Licensor.++ For the avoidance of doubt, this Section 6(b) does not affect any+ right the Licensor may have to seek remedies for Your violations+ of this Public License.++ c. For the avoidance of doubt, the Licensor may also offer the+ Licensed Material under separate terms or conditions or stop+ distributing the Licensed Material at any time; however, doing so+ will not terminate this Public License.++ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public+ License.+++Section 7 -- Other Terms and Conditions.++ a. The Licensor shall not be bound by any additional or different+ terms or conditions communicated by You unless expressly agreed.++ b. Any arrangements, understandings, or agreements regarding the+ Licensed Material not stated herein are separate from and+ independent of the terms and conditions of this Public License.+++Section 8 -- Interpretation.++ a. For the avoidance of doubt, this Public License does not, and+ shall not be interpreted to, reduce, limit, restrict, or impose+ conditions on any use of the Licensed Material that could lawfully+ be made without permission under this Public License.++ b. To the extent possible, if any provision of this Public License is+ deemed unenforceable, it shall be automatically reformed to the+ minimum extent necessary to make it enforceable. If the provision+ cannot be reformed, it shall be severed from this Public License+ without affecting the enforceability of the remaining terms and+ conditions.++ c. No term or condition of this Public License will be waived and no+ failure to comply consented to unless expressly agreed to by the+ Licensor.++ d. Nothing in this Public License constitutes or may be interpreted+ as a limitation upon, or waiver of, any privileges and immunities+ that apply to the Licensor or You, including from the legal+ processes of any jurisdiction or authority.+++=======================================================================++Creative Commons is not a party to its public+licenses. Notwithstanding, Creative Commons may elect to apply one of+its public licenses to material it publishes and in those instances+will be considered the “Licensor.” The text of the Creative Commons+public licenses is dedicated to the public domain under the CC0 Public+Domain Dedication. Except for the limited purpose of indicating that+material is shared under a Creative Commons public license or as+otherwise permitted by the Creative Commons policies published at+creativecommons.org/policies, Creative Commons does not authorize the+use of the trademark "Creative Commons" or any other trademark or logo+of Creative Commons without its prior written consent including,+without limitation, in connection with any unauthorized modifications+to any of its public licenses or any other arrangements,+understandings, or agreements concerning use of licensed material. For+the avoidance of doubt, this paragraph does not form part of the+public licenses.++Creative Commons may be contacted at creativecommons.org.diff --git a/store/agents/trailofbits-skills/README.md b/store/agents/trailofbits-skills/README.mdnew file mode 100644index 000000000..439d8af25--- /dev/null+++ b/store/agents/trailofbits-skills/README.md@@ -0,0 +1,75 @@+# Trail of Bits Skills, as a Harness agent++[Harness](https://github.com/autonomous-ai/openharness) agent package for+[Trail of Bits Skills](https://github.com/trailofbits/skills): open it on a codebase, ask for a+security audit, and watch the report fill in beside the terminal — scope, context, static analysis,+supply chain, variants, and every finding put through `fp-check` before it counts. Runs on Claude+Code by default and on every agent Harness integrates: the skills of eleven Trail of Bits+code-audit plugins are linked into the session, pinned and unedited.++- `harness.json` — the manifest: Claude Code by default, the template, the toolchain, the shared web+ viewer, and `agent.skills`: one skill of ours and each plugin's `skills/` folder under `upstream/`.+ Nothing is installed into the person's Claude Code or Codex configuration.+- `AGENTS.md` — what the agent is told: read, do not run; touch only `security-audit/`; nothing+ leaves the machine; verify every finding; rebuild the report after every change.+- `skills/trailofbits-harness/` — the one skill of ours: the `findings.json` format, which skill+ serves which phase, the tools on `$TOB_BIN`, and how the plugin features the skills assume are+ provided when they are linked: the plugin root, named sub-agents (a sub-agent given the plugin's+ own `agents/<name>.md`), `Workflow` scripts by absolute path, and fp-check's hook gates as a+ checklist.+- `upstream/` — the eleven plugins, fetched by setup at the commit in `VERSIONS` (not in git).+- `template/security-audit/findings.json` — the only thing this package adds to the audited+ repository, with the report generated beside it; it is also the workspace marker. Harness itself+ adds `.harness/` and a short session bootstrap in `CLAUDE.md`, as it does for every Claude Code+ harness. A repository that already had files is not trusted on the person's behalf: Claude Code+ asks, which is what an audit of someone else's code should do.+- `toolchain/` — `setup.sh` (the plugins at the pin; Semgrep and pip-audit at the versions upstream's+ scripts were verified with, in a Python 3.12 venv uv brings when the machine has none; `bin/` with+ them, uv and python3; playwright-core for the PDF), `doctor.sh`, `init-workspace.sh`, and+ `report.sh`/`report.mjs` (`$TOB_REPORT`: check findings.json, write `index.html`, `report.md`,+ optionally `report.pdf`, and the verdict).++The phases in the pane header are Scope, Context, Scan, Review, Verify and Report. The header is+ready only when the report is final and no finding is still unverified; confirmed high findings+count as errors and medium ones as warnings.++The Store example (`store/showcase/trailofbits-skills/nodegoat-audit.jpg`) is this harness's real+report on [OWASP NodeGoat](https://github.com/OWASP/NodeGoat) (Apache-2.0) at `c5cb68a`, a+deliberately vulnerable training app, from the example's prompt on Claude Code. It is shown as the+run left it: 5 findings confirmed, 5 dismissed, and 17 still unverified, because the model's safety+checks stopped their exploit write-ups — the report says so rather than confirming them.++## What the agent needs++Sub-agents: Claude Code and Codex both have them, so the plugins' named reviewers run as sub-agents+given the plugin's own prompt files. `c-review` and `audit-context-building`'s codebase mode run a+`Workflow` script, which needs Claude Code; elsewhere they fall back to per-unit review and the+report says so. `insecure-defaults` is not included: it is a `Workflow`-only command with no skill.+Plugin hooks do not run when skills are linked; fp-check's completeness gates are a checklist in the+bridging skill instead. CodeQL and ripgrep are optional; the skills fall back to Semgrep and+`grep -E`. If the person also installed the trailofbits marketplace in Claude Code, its copies of+these skills appear twice; disable the marketplace plugins for this workspace.++## Credit and stewardship++Trail of Bits Skills is Trail of Bits' work: [trailofbits/skills](https://github.com/trailofbits/skills),+Creative Commons Attribution-ShareAlike 4.0 (`LICENSE-trailofbits`), each plugin by the authors its+manifest names. The plugins are fetched at the commit in `VERSIONS` and loaded byte for byte+(`THIRD_PARTY_NOTICES.md`). Nothing of it is changed here.+This folder is the Harness wrapper — the manifest, the agent guide, the bridging skill, the+workspace template and the report writer — written by Autonomous to bring Trail of Bits' plugins into+Harness. We did that work on the project's behalf, to bootstrap the catalogue; the credit for what+the agent can do belongs upstream.++If you maintain Trail of Bits Skills and want to own its Harness package, it is yours: open an issue+on [OpenHarness](https://github.com/autonomous-ai/openharness/issues) and we move this folder into a+repository of yours and point the registry entry at it. Until then: bugs in the plugins belong+upstream, bugs in the wrapper belong here, and a newer release is a bump of `UPSTREAM_COMMIT` in+`VERSIONS`.++```sh+harness dsh check . # conformance+toolchain/setup.sh # upstream/, .venv/, bin/, node_modules/+harness dsh install "$PWD" --link # this checkout as the installed agent+node --test test/*.test.mjs # findings, report, verdict, and the plugin skills it links+```diff --git a/store/agents/trailofbits-skills/THIRD_PARTY_NOTICES.md b/store/agents/trailofbits-skills/THIRD_PARTY_NOTICES.mdnew file mode 100644index 000000000..67c82f64b--- /dev/null+++ b/store/agents/trailofbits-skills/THIRD_PARTY_NOTICES.md@@ -0,0 +1,24 @@+# Third-party notices++**Trail of Bits Skills** — [trailofbits/skills](https://github.com/trailofbits/skills), by Trail of Bits+and the authors named in each plugin's `.claude-plugin/plugin.json`. Creative Commons+Attribution-ShareAlike 4.0 International — `LICENSE-trailofbits`. Not vendored and not modified:+`toolchain/fetch-upstream.sh` fetches the eleven code-audit plugins listed in `VERSIONS` (with the+repository's `LICENSE` and `README.md`) at the pinned commit into `upstream/`, and their skills are+linked into the agent's session as they are. Reports an agent writes with them are the person's output.++**Semgrep** — [semgrep/semgrep](https://github.com/semgrep/semgrep) 1.173.0, LGPL-2.1, Semgrep, Inc.+**pip-audit** — [pypa/pip-audit](https://github.com/pypa/pip-audit) 2.10.1, Apache-2.0, Trail of Bits+and the PyPA. Not vendored: installed from PyPI by `toolchain/setup.sh` into this package's `.venv/`+at the versions `VERSIONS` pins. Semgrep's registry rules carry their own licences; the plugins fetch+only the rulesets they name, at scan time, with metrics off.++**playwright-core** — [microsoft/playwright](https://github.com/microsoft/playwright) 1.63.0,+Apache-2.0, Microsoft Corporation. Installed from npm by `toolchain/setup.sh` at the version pinned in+`package-lock.json`, to print the PDF report. **Chrome for Testing headless shell** — Google,+BSD-3-Clause with the licences in its own `LICENSE.headless_shell`; downloaded into `browsers/` only+on a machine with no Chrome. Neither is vendored.++Everything else here — the manifest, `AGENTS.md`, the `trailofbits-harness` skill, the workspace+template, the report and verdict tool and its tests — is Autonomous's under `LICENSE` (MIT). It is+not an adaptation of Trail of Bits' material, which it loads unchanged.diff --git a/store/agents/trailofbits-skills/VERSIONS b/store/agents/trailofbits-skills/VERSIONSnew file mode 100644index 000000000..c976623ac--- /dev/null+++ b/store/agents/trailofbits-skills/VERSIONS@@ -0,0 +1,12 @@+# Trail of Bits Skills — trailofbits/skills, wrapped here as it is on its main branch.+# A newer release is a bump of UPSTREAM_COMMIT to a later commit there, then `harness dsh update`.+UPSTREAM_NAME="trailofbits/skills"+UPSTREAM_REPO="https://github.com/trailofbits/skills.git"+UPSTREAM_COMMIT="82fe8226252622fa807643bdca1710901198553a"+# The code-audit plugins whose skills this harness links (harness.json agent.skills), their licence and+# README; not the other 34 plugins, their evals or the repository's own tooling.+UPSTREAM_SPARSE_MODE="no-cone"+UPSTREAM_SPARSE="/LICENSE /README.md /plugins/audit-context-building/ /plugins/differential-review/ /plugins/sharp-edges/ /plugins/static-analysis/ /plugins/supply-chain-risk-auditor/ /plugins/variant-analysis/ /plugins/fp-check/ /plugins/vulnerability-triage-brocards/ /plugins/agentic-actions-auditor/ /plugins/c-review/ /plugins/rust-review/"+# The versions upstream's static-analysis scripts were verified against.+SEMGREP_VERSION="1.173.0"+PIP_AUDIT_VERSION="2.10.1"diff --git a/store/agents/trailofbits-skills/harness.json b/store/agents/trailofbits-skills/harness.jsonnew file mode 100644index 000000000..56510843a--- /dev/null+++ b/store/agents/trailofbits-skills/harness.json@@ -0,0 +1,47 @@+{+ "spec": 1,+ "id": "autonomous/trailofbits-skills",+ "name": "Trail of Bits Skills",+ "category": "Security",+ "author": "Trail of Bits",+ "description": "Point it at a codebase; get a security audit the Trail of Bits way — context first, static analysis, variants, supply chain, every finding checked for false positives — as a live report in the pane.",+ "engine": "claude",+ "workspace": {+ "template": "template",+ "marker": "security-audit/findings.json",+ "init": "toolchain/init-workspace.sh"+ },+ "agent": {+ "instructions": "AGENTS.md",+ "skills": [+ "skills",+ "upstream/plugins/audit-context-building/skills",+ "upstream/plugins/differential-review/skills",+ "upstream/plugins/sharp-edges/skills",+ "upstream/plugins/static-analysis/skills",+ "upstream/plugins/supply-chain-risk-auditor/skills",+ "upstream/plugins/variant-analysis/skills",+ "upstream/plugins/fp-check/skills",+ "upstream/plugins/vulnerability-triage-brocards/skills",+ "upstream/plugins/agentic-actions-auditor/skills",+ "upstream/plugins/c-review/skills",+ "upstream/plugins/rust-review/skills"+ ],+ "env": {+ "TOB_SKILLS": "${dsh}/upstream",+ "TOB_BIN": "${dsh}/bin",+ "TOB_REPORT": "${dsh}/toolchain/report.sh",+ "SEMGREP_SEND_METRICS": "off",+ "SEMGREP_ENABLE_VERSION_CHECK": "0"+ }+ },+ "toolchain": {+ "setup": "toolchain/setup.sh",+ "doctor": "toolchain/doctor.sh"+ },+ "viewer": {+ "use": "autonomous/web-viewer",+ "url": "http://127.0.0.1:${port}/?file=security-audit/index.html"+ },+ "verdict": ".harness/verdict.json"+}diff --git a/store/agents/trailofbits-skills/package-lock.json b/store/agents/trailofbits-skills/package-lock.jsonnew file mode 100644index 000000000..067053b6b--- /dev/null+++ b/store/agents/trailofbits-skills/package-lock.json@@ -0,0 +1,25 @@+{+ "name": "harness-trailofbits-skills-toolchain",+ "lockfileVersion": 3,+ "requires": true,+ "packages": {+ "": {+ "name": "harness-trailofbits-skills-toolchain",+ "dependencies": {+ "playwright-core": "1.63.0"+ }+ },+ "node_modules/playwright-core": {+ "version": "1.63.0",+ "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.63.0.tgz",+ "integrity": "sha512-rYCsBF/M5HjUch52bbtVONEFjv6Xu8sm8h72dNlR5bzIE1fvC/bxgspzkjSfU+MweEMmPM8KJebG6nnyxo5mCg==",+ "license": "Apache-2.0",+ "bin": {+ "playwright-core": "cli.js"+ },+ "engines": {+ "node": ">=20"+ }+ }+ }+}diff --git a/store/agents/trailofbits-skills/package.json b/store/agents/trailofbits-skills/package.jsonnew file mode 100644index 000000000..b42467c2c--- /dev/null+++ b/store/agents/trailofbits-skills/package.json@@ -0,0 +1,9 @@+{+ "name": "harness-trailofbits-skills-toolchain",+ "private": true,+ "type": "module",+ "description": "What the Trail of Bits Skills harness prints its PDF report with. Installed by toolchain/setup.sh into this package, never globally.",+ "dependencies": {+ "playwright-core": "1.63.0"+ }+}diff --git a/store/agents/trailofbits-skills/skills/trailofbits-harness/SKILL.md b/store/agents/trailofbits-skills/skills/trailofbits-harness/SKILL.mdnew file mode 100644index 000000000..00a91081d--- /dev/null+++ b/store/agents/trailofbits-skills/skills/trailofbits-harness/SKILL.md@@ -0,0 +1,101 @@+---+name: trailofbits-harness+description: Use in every Trail of Bits Skills workspace inside Harness, before any audit skill — the findings.json format the report pane is built from, which Trail of Bits skill serves which audit phase, and how their plugin features (plugin root, named sub-agents, Workflow scripts, fp-check's gates) work when their skills are linked rather than installed as plugins.+---++# A Trail of Bits audit in Harness++Trail of Bits' skills are the method; this skill only says how their work lands in the report pane+and how the plugin features they assume are provided here. It changes none of their instructions.++## findings.json++`security-audit/findings.json` is the one file you edit. `"$TOB_REPORT"` checks it, rebuilds the+pane and the Markdown report from it, and prints every entry it had to leave out and why — fix those+before moving on.++```json+{+ "spec": 1,+ "target": { "name": "shop-api", "path": ".", "commit": "3f2c9a1…", "scope": ["src/", "api/"] },+ "phase": "review",+ "final": false,+ "summary": "Markdown: what was audited, how, and the headline risks.",+ "findings": [+ {+ "id": "F-1",+ "title": "SQL query built from request input",+ "severity": "high",+ "status": "unverified",+ "category": "injection",+ "source": "static-analysis/semgrep",+ "location": [{ "file": "src/db.py", "line": 42 }],+ "description": "Markdown: what is wrong.",+ "evidence": "Markdown: the data flow, the rule that fired, the fp-check verdict and its reasons.",+ "recommendation": "Markdown: how to fix it."+ }+ ]+}+```++- `phase`: `scope` → `context` → `scan` → `review` → `verify` → `report`. The header's strip is this.+- `severity`: `high`, `medium`, `low`, `informational`, `undetermined` — Trail of Bits' own scale.+- `status`: `unverified` when found, then `confirmed` or `false-positive` after `fp-check`. False+ positives stay in the file (the report lists them as dismissed, with their evidence).+- `id`: `F-1`, `F-2`, … in the order found; never reuse one. Paths are relative to the target.+- The Markdown fields render paragraphs, `-` lists, `code`, fenced code, **bold** and *italics* — nothing else.+ Everything is escaped, so quoting hostile strings from the code is safe.+- The report is ready (`ready` in the header) only when `final` is true and nothing is `unverified`.++## Which skill serves which phase++| Phase | Trail of Bits skill (plugin) | When |+|---|---|---|+| context | `audit-context-building` | always first: understand before hunting |+| scan | `semgrep`, `codeql` when installed, `sarif-parsing` (static-analysis) | always |+| scan | `supply-chain-risk-auditor` | a lockfile or manifest is present |+| scan | `sharp-edges` | APIs, configuration and defaults that invite misuse |+| scan | `agentic-actions-auditor` | `.github/workflows/` exists |+| scan | `c-review` / `rust-review` | C/C++ / Rust code in scope |+| review | `vulnerability-triage-brocards` | triage each candidate before deep work |+| review | `variant-analysis` | a confirmed bug suggests siblings elsewhere |+| review | `differential-review` | the person asks about a change, branch or PR |+| verify | `fp-check` | every finding, before it is `confirmed` |++Turn each skill's output — SARIF, ledgers, reports — into findings.json entries, citing it in+`source`.++## Plugin features, provided here++These skills were written as Claude Code plugins. Harness links their skills into every agent, so+the plugin machinery they mention is provided like this:++- **Plugin root.** Where a skill uses `${CLAUDE_PLUGIN_ROOT}`, `${CODEX_PLUGIN_ROOT}` or+ `<plugin_root>`, it is `$TOB_SKILLS/plugins/<plugin>` for the plugin the skill belongs to. Set it+ on the command that needs it — `CLAUDE_PLUGIN_ROOT="$TOB_SKILLS/plugins/c-review" …` — and use+ that path, not a search: a search of `.` would find copies inside the audited repository.+- **Named sub-agents.** When a skill dispatches `<plugin>:<agent>` (`fp-check:poc-builder`,+ `rust-review:rust-review-worker`, `audit-context-building:function-analyzer`), start a sub-agent+ with your own sub-agent tool and give it `$TOB_SKILLS/plugins/<plugin>/agents/<agent>.md` as its+ instructions, plus the task the skill describes. Hold it to the tools that file's front matter+ lists. Where the skill runs several in parallel, run them in parallel.+- **Plugin commands.** A `/<plugin>:<command>` that a skill mentions is a Markdown file,+ `$TOB_SKILLS/plugins/<plugin>/commands/<command>.md` (`/differential-review:diff-review`): read+ it and follow it, with the arguments the person gave.+- **Workflow scripts.** Where a skill calls Claude Code's `Workflow` tool with a+ script under `<plugin_root>/workflows/`, or a command such as `/audit-context-building:audit-context`+ that is backed by one, call `Workflow` with the absolute `scriptPath`+ (`$TOB_SKILLS/plugins/<plugin>/workflows/<name>.js`) and the arguments the skill documents. An+ agent without a `Workflow` tool follows the skill's single-unit mode over each unit in scope and+ says so in the report's summary.+- **fp-check's gates.** Its plugin hooks check, before a verification ends, that every phase and+ gate was done. Here nothing runs them for you: before you set a finding `confirmed` or+ `false-positive`, read the two prompts in `$TOB_SKILLS/plugins/fp-check/hooks/hooks.json` and+ check your own work against them; a gap keeps the finding `unverified`.++## Tools++The Semgrep, pip-audit, uv and Python the skills expect are in `$TOB_BIN`; put it first on each+command's PATH: `PATH="$TOB_BIN:$PATH" semgrep --metrics=off …`. CodeQL and ripgrep are optional+here; when they are missing, the skills' own fallbacks apply (`toolchain/doctor.sh` in the package+says which are present).diff --git a/store/agents/trailofbits-skills/store.json b/store/agents/trailofbits-skills/store.jsonnew file mode 100644index 000000000..c864ca01b--- /dev/null+++ b/store/agents/trailofbits-skills/store.json@@ -0,0 +1,13 @@+{+ "homepage": "https://github.com/trailofbits/skills",+ "upstream": "https://github.com/trailofbits/skills",+ "license": "CC-BY-SA-4.0",+ "tagline": "Skills to enhance AI-assisted security analysis and testing",+ "examples": [+ {+ "prompt": "Audit this Node.js app for security issues. Verify every finding before it counts, and give me a report I can hand to the team.",+ "image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/trailofbits-skills/nodegoat-audit.jpg",+ "caption": "OWASP NodeGoat · 27 findings: 5 confirmed, 5 dismissed as false positives, 17 awaiting verification"+ }+ ]+}diff --git a/store/agents/trailofbits-skills/template/security-audit/findings.json b/store/agents/trailofbits-skills/template/security-audit/findings.jsonnew file mode 100644index 000000000..9c54058f9--- /dev/null+++ b/store/agents/trailofbits-skills/template/security-audit/findings.json@@ -0,0 +1,8 @@+{+ "spec": 1,+ "target": { "name": "", "path": ".", "commit": "", "scope": [] },+ "phase": "scope",+ "final": false,+ "summary": "",+ "findings": []+}diff --git a/store/agents/trailofbits-skills/test/report.test.mjs b/store/agents/trailofbits-skills/test/report.test.mjsnew file mode 100644index 000000000..8445c8398--- /dev/null+++ b/store/agents/trailofbits-skills/test/report.test.mjs@@ -0,0 +1,154 @@+// The audit's findings file, read strictly, and what it becomes: the pane's report page, the+// Markdown report, and the header's verdict.+import assert from 'node:assert/strict'+import { test } from 'node:test'+import { markdownToHtml, PHASES, readAudit, renderHtml, renderMarkdown, verdictFor } from '../toolchain/report.mjs'++const NOW = '2026-09-29T12:00:00.000Z'++function finding(fields = {}) {+ return {+ id: 'TOB-1', title: 'SQL built from request input', severity: 'high', status: 'confirmed',+ location: [{ file: 'src/db.py', line: 42 }], description: 'The query is concatenated.', ...fields,+ }+}+function audit(fields = {}) {+ return { spec: 1, target: { name: 'shop' }, phase: 'review', final: false, findings: [], ...fields }+}+const read = (value) => readAudit(JSON.stringify(value))++test('a well-formed findings file reads without errors', () => {+ const { audit: a, errors } = read(audit({ findings: [finding()] }))+ assert.deepEqual(errors, [])+ assert.equal(a.findings[0].id, 'TOB-1')+})++test('a findings file that is not JSON is one error, and an empty audit to show', () => {+ const { audit: a, errors } = readAudit('{ nope')+ assert.equal(errors.length, 1)+ assert.match(errors[0], /not valid JSON/)+ assert.deepEqual(a.findings, [])+})++test('each malformed finding is named by its index and field, and left out', () => {+ const { audit: a, errors } = read(audit({ findings: [+ finding(),+ finding({ id: 'TOB-2', severity: 'critical' }),+ finding({ id: 'TOB-3', status: 'maybe' }),+ finding({ id: 'TOB-4', title: '' }),+ ] }))+ assert.deepEqual(a.findings.map((f) => f.id), ['TOB-1'])+ assert.equal(errors.length, 3)+ assert.match(errors[0], /findings\[1\].*severity/)+ assert.match(errors[1], /findings\[2\].*status/)+ assert.match(errors[2], /findings\[3\].*title/)+})++test('two findings with one id are an error', () => {+ const { errors } = read(audit({ findings: [finding(), finding()] }))+ assert.match(errors.join('\n'), /duplicate id TOB-1/)+})++test('an unknown phase is an error and reads as scope', () => {+ const { audit: a, errors } = read(audit({ phase: 'hunting' }))+ assert.equal(a.phase, 'scope')+ assert.match(errors[0], /phase/)+})++test('phases before the current one are done, the current one active', () => {+ const verdict = verdictFor(read(audit({ phase: 'verify' })).audit, { now: NOW })+ assert.deepEqual(verdict.phases.map((p) => [p.id, p.state]),+ PHASES.map((id, i) => [id, i < 4 ? 'done' : i === 4 ? 'active' : 'pending']))+ assert.equal(verdict.artifact, 'security-audit/index.html')+ assert.equal(verdict.updatedAt, NOW)+})++test('confirmed high is an error, medium a warning, low and informational information', () => {+ const verdict = verdictFor(read(audit({ findings: [+ finding({ id: 'A', severity: 'high' }), finding({ id: 'B', severity: 'medium' }),+ finding({ id: 'C', severity: 'low' }), finding({ id: 'D', severity: 'informational' }),+ ] })).audit, { now: NOW })+ assert.deepEqual(verdict.findings.map((f) => [f.ref, f.severity]),+ [['A', 'error'], ['B', 'warning'], ['C', 'info'], ['D', 'info']])+ assert.match(verdict.summary, /1 high · 1 medium · 1 low · 1 informational/)+})++test('an unverified finding is a warning whatever its severity, and false positives are not findings', () => {+ const verdict = verdictFor(read(audit({ findings: [+ finding({ id: 'A', severity: 'low', status: 'unverified' }),+ finding({ id: 'B', status: 'false-positive' }),+ ] })).audit, { now: NOW })+ assert.deepEqual(verdict.findings.map((f) => [f.ref, f.severity, f.kind]), [['A', 'warning', 'unverified']])+ assert.match(verdict.summary, /1 unverified/)+ assert.match(verdict.summary, /1 dismissed/)+})++test('ready only when the report is final and nothing is left unverified', () => {+ const done = audit({ phase: 'report', final: true, findings: [finding()] })+ assert.equal(verdictFor(read(done).audit, { now: NOW }).ready, true)+ assert.ok(verdictFor(read(done).audit, { now: NOW }).phases.every((p) => p.state === 'done'))+ const pending = audit({ phase: 'report', final: true, findings: [finding({ status: 'unverified' })] })+ assert.equal(verdictFor(read(pending).audit, { now: NOW }).ready, false)+ assert.equal(verdictFor(read(audit({ phase: 'report' })).audit, { now: NOW }).ready, false)+})++test('a final report with no findings says so plainly', () => {+ const verdict = verdictFor(read(audit({ phase: 'report', final: true })).audit, { now: NOW })+ assert.equal(verdict.ready, true)+ assert.match(verdict.summary, /no findings/i)+})++test('errors in the findings file are error findings and keep it not ready', () => {+ const { audit: a, errors } = read(audit({ phase: 'report', final: true, findings: [finding({ severity: 'nope' })] }))+ const verdict = verdictFor(a, { errors, now: NOW })+ assert.equal(verdict.ready, false)+ assert.deepEqual(verdict.findings.map((f) => [f.severity, f.kind]), [['error', 'findings-file']])+})++test('the page escapes everything the audited code could have put in a finding', () => {+ const html = renderHtml(read(audit({ target: { name: '<img src=x onerror=alert(1)>' }, findings: [finding({+ title: '<script>alert(1)</script>', description: 'uses `<b>` and <a href="javascript:x">here</a>',+ location: [{ file: '"><svg onload=1>', line: 3 }],+ })] })).audit)+ assert.doesNotMatch(html, /<script>alert|<img src=x|<svg onload|<a href="javascript/)+ assert.match(html, /<script>alert\(1\)<\/script>/)+})++test('the page lists findings by severity, with their locations and a summary table', () => {+ const html = renderHtml(read(audit({ findings: [+ finding({ id: 'L', severity: 'low', title: 'Low one' }), finding({ id: 'H', severity: 'high', title: 'High one' }),+ ] })).audit)+ assert.ok(html.indexOf('High one') < html.indexOf('Low one'))+ assert.match(html, /src\/db\.py:42/)+ assert.match(html, /<table/)+})++test('the Markdown report carries every confirmed and unverified finding, not false positives', () => {+ const md = renderMarkdown(read(audit({ findings: [+ finding({ id: 'A', title: 'Kept' }), finding({ id: 'B', title: 'Dismissed', status: 'false-positive' }),+ ] })).audit)+ assert.match(md, /## A · Kept/)+ assert.doesNotMatch(md, /## B/)+ assert.match(md, /Dismissed as false positives: B/)+})++test('markdown renders code, emphasis and lists, and nothing else as markup', () => {+ const html = markdownToHtml('Use `exec()` **never**.\n\n- one\n- two\n\n```\nrm -rf <dir>\n```')+ assert.match(html, /<code>exec\(\)<\/code>/)+ assert.match(html, /<strong>never<\/strong>/)+ assert.match(html, /<ul><li>one<\/li><li>two<\/li><\/ul>/)+ assert.match(html, /<pre><code>rm -rf <dir><\/code><\/pre>/)+})++test('single-asterisk emphasis renders as italics, without touching bold, lists or code', () => {+ assert.match(markdownToHtml('a *deliberately vulnerable* app'), /a <em>deliberately vulnerable<\/em> app/)+ assert.match(markdownToHtml('**bold** and *it*'), /<strong>bold<\/strong> and <em>it<\/em>/)+ assert.match(markdownToHtml('- one\n- two'), /<ul><li>one<\/li><li>two<\/li><\/ul>/)+ assert.match(markdownToHtml('`a*b*c`'), /<code>a\*b\*c<\/code>/)+ assert.match(markdownToHtml('2 * 3 * 4'), /2 \* 3 \* 4/)+})++test('a list right under a line of text is still a list', () => {+ const html = markdownToHtml('**Headline risks:**\n- one\n- two\nAfter.')+ assert.match(html, /<p><strong>Headline risks:<\/strong><\/p>\s*<ul><li>one<\/li><li>two<\/li><\/ul>\s*<p>After\.<\/p>/)+})diff --git a/store/agents/trailofbits-skills/test/toolchain.test.mjs b/store/agents/trailofbits-skills/test/toolchain.test.mjsnew file mode 100644index 000000000..8f7bd3bad--- /dev/null+++ b/store/agents/trailofbits-skills/test/toolchain.test.mjs@@ -0,0 +1,99 @@+// The package as installed: the template starts a valid audit, the report command writes what the+// pane and the person read, and the plugin skills harness.json links are the ones setup fetched —+// portable to every engine, with every sub-agent they name findable by the bridging skill's rule.+import assert from 'node:assert/strict'+import { cpSync, existsSync, mkdtempSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'+import { tmpdir } from 'node:os'+import { dirname, join } from 'node:path'+import { after, test } from 'node:test'+import { fileURLToPath } from 'node:url'+import { browserPath, readAudit, writeReport } from '../toolchain/report.mjs'++const pkg = dirname(dirname(fileURLToPath(import.meta.url)))+const manifest = JSON.parse(readFileSync(join(pkg, 'harness.json'), 'utf8'))+const PLUGIN_SKILLS = /^upstream\/plugins\/([a-z0-9-]+)\/skills$/+const plugins = manifest.agent.skills.flatMap((root) => root.match(PLUGIN_SKILLS)?.[1] ?? [])+const fetched = existsSync(join(pkg, 'upstream', '.harness-commit'))+const chrome = existsSync(join(pkg, 'node_modules', 'playwright-core')) && browserPath() !== null+const scratch = []+after(() => { for (const dir of scratch) rmSync(dir, { recursive: true, force: true }) })++function workspace() {+ const dir = mkdtempSync(join(tmpdir(), 'tob-'))+ scratch.push(dir)+ cpSync(join(pkg, 'template'), dir, { recursive: true })+ return dir+}++test('the template starts a valid audit in its scope phase', () => {+ const { audit, errors } = readAudit(readFileSync(join(pkg, 'template', 'security-audit', 'findings.json'), 'utf8'))+ assert.deepEqual(errors, [])+ assert.equal(audit.phase, 'scope')+ assert.equal(manifest.workspace.marker, 'security-audit/findings.json')+})++test('the template adds one folder to a repository, and nothing else', () => {+ assert.deepEqual(readdirSync(join(pkg, 'template')), ['security-audit'])+})++test('the report command writes the page, the Markdown report and the verdict', async () => {+ const dir = workspace()+ const { verdict } = await writeReport(dir, { now: '2026-09-29T00:00:00.000Z' })+ assert.match(readFileSync(join(dir, 'security-audit', 'index.html'), 'utf8'), /<h1>Security audit/)+ assert.match(readFileSync(join(dir, 'security-audit', 'report.md'), 'utf8'), /^# Security audit/)+ assert.deepEqual(JSON.parse(readFileSync(join(dir, '.harness', 'verdict.json'), 'utf8')), verdict)+ assert.equal(verdict.ready, false)+ assert.equal(verdict.artifact, manifest.viewer.url.match(/file=([^&]+)/)[1])+})++test('a broken findings file still gets a page that says what is wrong', async () => {+ const dir = workspace()+ writeFileSync(join(dir, 'security-audit', 'findings.json'), '{ "phase": "scan", "findings": [ { "id": "F-1" } ] }')+ const { errors, verdict } = await writeReport(dir)+ assert.ok(errors.length > 0)+ assert.match(readFileSync(join(dir, 'security-audit', 'index.html'), 'utf8'), /findings\.json has problems/)+ assert.ok(verdict.findings.some((f) => f.kind === 'findings-file'))+})++test('--pdf prints the report to a PDF', { skip: !chrome && 'needs setup and Chrome' }, async () => {+ const dir = workspace()+ await writeReport(dir, { pdf: true })+ assert.equal(readFileSync(join(dir, 'security-audit', 'report.pdf')).subarray(0, 5).toString(), '%PDF-')+})++test('the plugin skills harness.json links are exactly the plugins VERSIONS fetches', () => {+ const versions = readFileSync(join(pkg, 'VERSIONS'), 'utf8')+ const sparse = versions.match(/UPSTREAM_SPARSE="([^"]+)"/)[1].split(' ')+ .filter((p) => p.startsWith('/plugins/')).map((p) => p.replace(/^\/plugins\/|\/$/g, '')).sort()+ assert.ok(manifest.agent.skills.filter((root) => root !== 'skills').every((root) => PLUGIN_SKILLS.test(root)))+ assert.deepEqual([...plugins].sort(), sparse)+})++test('every plugin harness.json links was fetched, with skills in it', { skip: !fetched && 'run toolchain/setup.sh first' }, () => {+ for (const plugin of plugins) {+ const dir = join(pkg, 'upstream', 'plugins', plugin, 'skills')+ assert.ok(existsSync(dir), plugin)+ assert.ok(readdirSync(dir).some((name) => existsSync(join(dir, name, 'SKILL.md'))), plugin)+ }+})++test('no two linked skills share a name, which would refuse the launch', { skip: !fetched && 'run toolchain/setup.sh first' }, () => {+ const names = manifest.agent.skills.flatMap((root) => readdirSync(join(pkg, root)).filter((n) => existsSync(join(pkg, root, n, 'SKILL.md'))))+ assert.equal(new Set(names).size, names.length, names.join(', '))+})++test('every sub-agent a linked skill names has the prompt file the bridging skill points at', { skip: !fetched && 'run toolchain/setup.sh first' }, () => {+ const named = new Set()+ for (const plugin of plugins) {+ const dir = join(pkg, 'upstream', 'plugins', plugin, 'skills')+ for (const skill of readdirSync(dir)) {+ const text = existsSync(join(dir, skill, 'SKILL.md')) ? readFileSync(join(dir, skill, 'SKILL.md'), 'utf8') : ''+ for (const [, owner, agent] of text.matchAll(/\b([a-z0-9-]+):([a-z0-9-]+-(?:worker|judge|analyzer|verifier|builder|modeler))\b/g)) named.add(`${owner}/${agent}`)+ }+ }+ assert.ok(named.size > 0)+ for (const ref of named) {+ const [owner, agent] = ref.split('/')+ assert.ok(existsSync(join(pkg, 'upstream', 'plugins', owner, 'agents', `${agent}.md`)), ref)+ }+})diff --git a/store/agents/trailofbits-skills/toolchain/doctor.sh b/store/agents/trailofbits-skills/toolchain/doctor.shnew file mode 100755index 000000000..04853e5fa--- /dev/null+++ b/store/agents/trailofbits-skills/toolchain/doctor.sh@@ -0,0 +1,26 @@+#!/usr/bin/env bash+# One line per thing the harness needs; exit 0 only when the audit can run. warn lines are tools a+# skill can do without.+set -uo pipefail+cd "$(dirname "$0")/.."+# shellcheck source=runtimes.sh+. toolchain/runtimes.sh+. ./VERSIONS+export SEMGREP_SEND_METRICS=off SEMGREP_ENABLE_VERSION_CHECK=0+status=0+if [ "$(cat upstream/.harness-commit 2>/dev/null)" = "${UPSTREAM_COMMIT}" ]; then echo "ok ${UPSTREAM_NAME} @ ${UPSTREAM_COMMIT:0:12}"+else echo "miss ${UPSTREAM_NAME} @ ${UPSTREAM_COMMIT:0:12} — run toolchain/setup.sh"; status=1; fi+for tool in semgrep pip-audit uv; do+ if version=$(bin/$tool --version 2>/dev/null); then echo "ok $tool ${version#$tool }"; else echo "miss $tool — run toolchain/setup.sh"; status=1; fi+done+if ! harness_node 20 >/dev/null; then echo "miss node 20 or newer"; exit 1; fi+echo "ok node $(node --version)"+missing=""+for dir in $(node -e 'for (const root of require("./harness.json").agent.skills) if (root.startsWith("upstream/")) console.log(root)'); do+ [ -n "$(find "$dir" -mindepth 2 -maxdepth 2 -name SKILL.md 2>/dev/null)" ] || missing="$missing $(basename "$(dirname "$dir")")"+done+if [ -z "$missing" ]; then echo "ok every plugin skill harness.json links is here"; else echo "miss plugin skills:$missing — run toolchain/setup.sh"; status=1; fi+node toolchain/report.mjs --browser+if command -v rg >/dev/null 2>&1; then echo "ok ripgrep"; else echo "warn ripgrep not on PATH: rust-review falls back to grep -E"; fi+if command -v codeql >/dev/null 2>&1; then echo "ok codeql $(codeql version --format=terse 2>/dev/null)"; else echo "warn CodeQL not installed: static-analysis runs Semgrep alone"; fi+exit $statusdiff --git a/store/agents/trailofbits-skills/toolchain/fetch-upstream.sh b/store/agents/trailofbits-skills/toolchain/fetch-upstream.shnew file mode 100755index 000000000..92c22210f--- /dev/null+++ b/store/agents/trailofbits-skills/toolchain/fetch-upstream.sh@@ -0,0 +1,26 @@+#!/usr/bin/env bash+# Fetch Trail of Bits' skills into upstream/ at the commit VERSIONS pins — read-only, from its public+# repository, sparse and blob-less so only the plugins this harness loads come down. Idempotent: a+# matching upstream/.harness-commit means it is already there. Run by setup.sh; cwd = the package dir.+set -euo pipefail+. ./VERSIONS+if [ -f upstream/.harness-commit ] && [ "$(cat upstream/.harness-commit)" = "${UPSTREAM_COMMIT}" ]; then+ echo "ok ${UPSTREAM_NAME} @ ${UPSTREAM_COMMIT:0:12} already fetched"+ exit 0+fi+command -v git >/dev/null 2>&1 || { echo "miss git on PATH"; exit 1; }+echo " fetching ${UPSTREAM_REPO} @ ${UPSTREAM_COMMIT:0:12} (${UPSTREAM_SPARSE_MODE} sparse)"+# The copy in upstream/ stays until the new one is complete: a fetch that fails (offline, a bad pin)+# leaves the install that worked.+rm -rf upstream.partial+git init -q upstream.partial+git -C upstream.partial remote add origin "${UPSTREAM_REPO}"+# Split the patterns on spaces WITHOUT globbing: `/*` is a sparse pattern, not the filesystem root.+read -r -a patterns <<<"${UPSTREAM_SPARSE}"+git -C upstream.partial sparse-checkout set --"${UPSTREAM_SPARSE_MODE}" -- "${patterns[@]}"+git -C upstream.partial fetch -q --depth 1 --filter=blob:none origin "${UPSTREAM_COMMIT}"+git -C upstream.partial checkout -q FETCH_HEAD+echo "${UPSTREAM_COMMIT}" > upstream.partial/.harness-commit+rm -rf upstream+mv upstream.partial upstream+echo "ok ${UPSTREAM_NAME} @ ${UPSTREAM_COMMIT:0:12} fetched ($(du -sh upstream | cut -f1))"diff --git a/store/agents/trailofbits-skills/toolchain/init-workspace.sh b/store/agents/trailofbits-skills/toolchain/init-workspace.shnew file mode 100755index 000000000..8463526f2--- /dev/null+++ b/store/agents/trailofbits-skills/toolchain/init-workspace.sh@@ -0,0 +1,4 @@+#!/usr/bin/env bash+# Runs once in a workspace, after Harness copies template/ (security-audit/findings.json) into it:+# render the empty report so the pane has a page, and seed the verdict so the header has a state.+exec "$(cd "$(dirname "$0")" && pwd)/report.sh"diff --git a/store/agents/trailofbits-skills/toolchain/report.mjs b/store/agents/trailofbits-skills/toolchain/report.mjsnew file mode 100644index 000000000..6875bb159--- /dev/null+++ b/store/agents/trailofbits-skills/toolchain/report.mjs@@ -0,0 +1,324 @@+// The audit as the person sees it, from the one file the agent keeps: security-audit/findings.json.+//+// node toolchain/report.mjs [workspace] [--pdf]+// node toolchain/report.mjs --browser [--install] the PDF's browser: say which, or fetch one+//+// writes security-audit/index.html (the pane), security-audit/report.md (the deliverable), with+// --pdf security-audit/report.pdf, and .harness/verdict.json (the header). Every string in a+// finding may have come from the code under audit, so the page escapes all of it and renders only+// a small Markdown subset: paragraphs, lists, inline code, code blocks, bold, italics. No links, no HTML.+import { execFileSync } from 'node:child_process'+import { existsSync, mkdirSync, readdirSync, readFileSync, renameSync, writeFileSync } from 'node:fs'+import { delimiter, dirname, join, resolve } from 'node:path'+import { fileURLToPath } from 'node:url'++const AUDIT_DIR = 'security-audit'+const FINDINGS = `${AUDIT_DIR}/findings.json`+const ARTIFACT = `${AUDIT_DIR}/index.html`+export const PHASES = ['scope', 'context', 'scan', 'review', 'verify', 'report']+const PHASE_NAMES = { scope: 'Scope', context: 'Context', scan: 'Scan', review: 'Review', verify: 'Verify', report: 'Report' }+const SEVERITIES = ['high', 'medium', 'low', 'informational', 'undetermined']+const STATUSES = ['unverified', 'confirmed', 'false-positive']+const ID = /^[A-Za-z0-9._-]{1,40}$/++const isText = (value, max = 20_000) => typeof value === 'string' && value.length <= max+const optionalText = (value, max) => value === undefined || isText(value, max)++// ── read ─────────────────────────────────────────────────────────────────────────────────────────++/** Parse and check [text]; what is wrong is reported and left out, never guessed at. */+export function readAudit(text) {+ const errors = []+ const empty = { target: {}, phase: 'scope', final: false, summary: '', findings: [] }+ let raw+ try {+ raw = JSON.parse(text)+ } catch (error) {+ return { audit: empty, errors: [`${FINDINGS} is not valid JSON: ${error.message}`] }+ }+ if (!raw || typeof raw !== 'object' || Array.isArray(raw)) return { audit: empty, errors: [`${FINDINGS} must be a JSON object`] }++ const target = raw.target && typeof raw.target === 'object' ? raw.target : {}+ const audit = {+ target: {+ name: isText(target.name, 200) ? target.name : '',+ path: isText(target.path, 1000) ? target.path : '',+ commit: isText(target.commit, 100) ? target.commit : '',+ scope: Array.isArray(target.scope) ? target.scope.filter((s) => isText(s, 1000)) : [],+ },+ phase: PHASES.includes(raw.phase) ? raw.phase : 'scope',+ final: raw.final === true,+ summary: isText(raw.summary) ? raw.summary : '',+ findings: [],+ }+ if (raw.phase !== undefined && !PHASES.includes(raw.phase)) errors.push(`phase must be one of ${PHASES.join(', ')} (got ${JSON.stringify(raw.phase)})`)+ if (raw.findings !== undefined && !Array.isArray(raw.findings)) errors.push('findings must be an array')++ const seen = new Set()+ for (const [index, item] of (Array.isArray(raw.findings) ? raw.findings : []).entries()) {+ const bad = (field, rule) => errors.push(`findings[${index}]${item?.id ? ` (${item.id})` : ''}: ${field} ${rule}`)+ if (!item || typeof item !== 'object') { bad('entry', 'must be an object'); continue }+ const before = errors.length+ if (!isText(item.id, 40) || !ID.test(item.id)) bad('id', 'must be letters, digits, . _ or -, at most 40')+ else if (seen.has(item.id)) bad('id', `is a duplicate id ${item.id}`)+ if (!isText(item.title, 200) || !item.title.trim()) bad('title', 'must be a non-empty line of at most 200 characters')+ if (!SEVERITIES.includes(item.severity)) bad('severity', `must be one of ${SEVERITIES.join(', ')}`)+ if (!STATUSES.includes(item.status)) bad('status', `must be one of ${STATUSES.join(', ')}`)+ const location = item.location ?? []+ if (!Array.isArray(location) || !location.every((l) => l && isText(l.file, 1000) && l.file && (l.line === undefined || (Number.isInteger(l.line) && l.line > 0)))) {+ bad('location', 'must be a list of { file, line? }')+ }+ for (const field of ['description', 'evidence', 'recommendation', 'category', 'source']) {+ if (!optionalText(item[field])) bad(field, 'must be text')+ }+ if (errors.length !== before) continue+ seen.add(item.id)+ audit.findings.push({+ id: item.id, title: item.title.trim(), severity: item.severity, status: item.status, location,+ description: item.description ?? '', evidence: item.evidence ?? '', recommendation: item.recommendation ?? '',+ category: item.category ?? '', source: item.source ?? '',+ })+ }+ return { audit, errors }+}++// ── verdict ──────────────────────────────────────────────────────────────────────────────────────++const open = (audit) => audit.findings.filter((f) => f.status !== 'false-positive')+const dismissed = (audit) => audit.findings.filter((f) => f.status === 'false-positive')+const locationText = (l) => `${l.file}${l.line ? `:${l.line}` : ''}`+const title = (audit) => `Security audit${audit.target.name ? ` — ${audit.target.name}` : ''}`++/** Done before the current phase (every phase, once final), active at it, pending after it. */+function phaseStates(audit) {+ const current = PHASES.indexOf(audit.phase)+ return PHASES.map((id, i) => ({ id, name: PHASE_NAMES[id], state: audit.final || i < current ? 'done' : i === current ? 'active' : 'pending' }))+}++/** The open findings per severity, in the scale's order, with how many of each are unverified. */+function severityGroups(live) {+ return SEVERITIES.map((severity) => {+ const list = live.filter((f) => f.severity === severity)+ return { severity, count: list.length, unverified: list.filter((f) => f.status === 'unverified').length }+ }).filter((group) => group.count)+}++export function verdictFor(audit, { errors = [], now = new Date().toISOString() } = {}) {+ const live = open(audit)+ const groups = severityGroups(live)+ const unverified = groups.reduce((n, g) => n + g.unverified, 0)+ const ready = audit.final && !unverified && errors.length === 0++ const findings = errors.map((message) => ({ severity: 'error', kind: 'findings-file', message, ref: FINDINGS }))+ for (const f of live) {+ const severity = f.status === 'unverified' ? 'warning' : f.severity === 'high' ? 'error' : f.severity === 'medium' ? 'warning' : 'info'+ const where = f.location[0] ? ` (${locationText(f.location[0])})` : ''+ findings.push({ severity, kind: f.status === 'unverified' ? 'unverified' : 'finding', message: `${f.severity}: ${f.title}${where}`, ref: f.id })+ }++ const tally = groups.map((g) => `${g.count} ${g.severity}`)+ if (unverified) tally.push(`${unverified} unverified`)+ if (dismissed(audit).length) tally.push(`${dismissed(audit).length} dismissed`)+ const head = audit.final ? 'Report final' : PHASE_NAMES[audit.phase]+ const body = tally.length ? tally.join(' · ') : audit.final ? 'no findings' : 'no findings yet'+ const summary = `${head} · ${body}${errors.length ? ` · ${errors.length} error${errors.length > 1 ? 's' : ''} in findings.json` : ''}`+ return { spec: 1, ready, summary: summary.slice(0, 200), findings, artifact: ARTIFACT, phases: phaseStates(audit), updatedAt: now }+}++// ── markdown subset ──────────────────────────────────────────────────────────────────────────────++const escapeHtml = (text) => String(text)+ .replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''')++function inline(text) {+ return escapeHtml(text)+ .split(/(`[^`]+`)/g)+ .map((part) => (part.startsWith('`') && part.endsWith('`') && part.length > 1+ ? `<code>${part.slice(1, -1)}</code>`+ : part.replace(/\*\*([^*]+)\*\*/g, '<strong>$1</strong>')+ .replace(/(^|[^\w*])\*(?=\S)([^*]*?\S)\*(?![\w*])/g, '$1<em>$2</em>')))+ .join('')+}++/** Paragraphs, `-`/`*` lists, inline code, fenced code, bold, italics — everything else stays text. */+export function markdownToHtml(markdown) {+ const out = []+ const chunks = String(markdown).replace(/\r\n/g, '\n').split(/^```[^\n]*\n?/m)+ chunks.forEach((chunk, i) => {+ if (i % 2 === 1) { out.push(`<pre><code>${escapeHtml(chunk.replace(/\n$/, ''))}</code></pre>`); return }+ for (const block of chunk.split(/\n\s*\n/).map((b) => b.trim()).filter(Boolean)) {+ // A block alternates runs of list items and lines of text, as a list under a heading line does.+ const runs = []+ for (const line of block.split('\n')) {+ const item = /^\s*[-*]\s+/.test(line)+ if (runs.at(-1)?.item !== item) runs.push({ item, lines: [] })+ runs.at(-1).lines.push(item ? line.replace(/^\s*[-*]\s+/, '') : line)+ }+ for (const run of runs) {+ out.push(run.item ? `<ul>${run.lines.map((l) => `<li>${inline(l)}</li>`).join('')}</ul>` : `<p>${run.lines.map(inline).join('<br>')}</p>`)+ }+ }+ })+ return out.join('\n')+}++// ── page ─────────────────────────────────────────────────────────────────────────────────────────++const bySeverity = (a, b) => SEVERITIES.indexOf(a.severity) - SEVERITIES.indexOf(b.severity) || a.id.localeCompare(b.id, undefined, { numeric: true })++const STYLE = `+:root{color-scheme:light dark;--bg:#fbfbfa;--fg:#1d1f23;--muted:#62666d;--line:#e3e4e6;--card:#fff;--code:#f2f3f4;+--high:#c2362c;--medium:#b86b00;--low:#2f6fb3;--informational:#5d6670;--undetermined:#7a5ab5;--ok:#2e7d4f}+@media (prefers-color-scheme:dark){:root{--bg:#16181c;--fg:#e6e7e9;--muted:#9aa0a6;--line:#2c2f35;--card:#1d2025;--code:#262a30;+--high:#ff6b5e;--medium:#f0a73a;--low:#6aa8f0;--informational:#a3abb5;--undetermined:#b69cf0;--ok:#5fc48a}}+*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--fg);font:14px/1.55 system-ui,sans-serif}+main{max-width:920px;margin:0 auto;padding:28px 20px 60px}h1{font-size:22px;margin:0 0 4px}h2{font-size:16px;margin:0}+.meta,.muted{color:var(--muted)}.meta{font-size:13px;margin-bottom:18px}+.phases{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0 22px}.phase{font-size:12px;padding:3px 10px;border-radius:99px;border:1px solid var(--line);color:var(--muted)}+.phase.done{color:var(--ok);border-color:var(--ok)}.phase.active{color:var(--fg);border-color:var(--fg);font-weight:600}+table{border-collapse:collapse;margin:8px 0 26px;font-size:13px}th,td{text-align:left;padding:6px 14px 6px 0;border-bottom:1px solid var(--line)}+.finding{background:var(--card);border:1px solid var(--line);border-left:4px solid var(--sev);border-radius:8px;padding:14px 16px;margin:14px 0}+.head{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}.id{font:600 12px ui-monospace,monospace;color:var(--muted)}+.badge{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--sev)}+.status{font-size:11px;padding:1px 7px;border-radius:99px;border:1px solid var(--line)}.status.unverified{border-color:var(--medium);color:var(--medium)}+.loc{font:12px ui-monospace,monospace;color:var(--muted);margin:6px 0 2px}h3{font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin:14px 0 4px}+code{font:12.5px ui-monospace,monospace;background:var(--code);padding:1px 4px;border-radius:4px}pre{background:var(--code);padding:10px 12px;border-radius:6px;overflow-x:auto}pre code{padding:0;background:none}+.errors{border:1px solid var(--high);border-radius:8px;padding:10px 14px;margin:0 0 20px}.errors li{font:12px ui-monospace,monospace}+details{margin-top:26px}summary{cursor:pointer;color:var(--muted)}.empty{padding:40px 0;text-align:center;color:var(--muted)}`++function findingHtml(f) {+ const section = (title, body) => (body.trim() ? `<h3>${title}</h3>${markdownToHtml(body)}` : '')+ return `<article class="finding" style="--sev:var(--${f.severity})">+<div class="head"><span class="id">${escapeHtml(f.id)}</span><h2>${escapeHtml(f.title)}</h2></div>+<div class="head"><span class="badge">${f.severity}</span><span class="status ${f.status}">${f.status.replace('-', ' ')}</span>${f.category ? `<span class="muted">${escapeHtml(f.category)}</span>` : ''}${f.source ? `<span class="muted">· ${escapeHtml(f.source)}</span>` : ''}</div>+${f.location.length ? `<div class="loc">${f.location.map((l) => escapeHtml(locationText(l))).join('<br>')}</div>` : ''}+${section('Description', f.description)}${section('Evidence', f.evidence)}${section('Recommendation', f.recommendation)}+</article>`+}++export function renderHtml(audit, { errors = [] } = {}) {+ const live = open(audit).sort(bySeverity)+ const gone = dismissed(audit).sort(bySeverity)+ const phases = phaseStates(audit).map((p) => `<span class="phase ${p.state}">${p.name}</span>`).join('')+ const rows = severityGroups(live)+ .map((g) => `<tr><td><span class="badge" style="--sev:var(--${g.severity})">${g.severity}</span></td><td>${g.count}</td><td>${g.unverified}</td></tr>`).join('')+ const meta = [audit.target.path && audit.target.path !== '.' && `path <code>${escapeHtml(audit.target.path)}</code>`,+ audit.target.commit && `commit <code>${escapeHtml(audit.target.commit.slice(0, 12))}</code>`,+ audit.target.scope.length && `scope ${audit.target.scope.map((s) => `<code>${escapeHtml(s)}</code>`).join(', ')}`,+ audit.final ? 'final report' : 'in progress'].filter(Boolean).join(' · ')+ return `<!doctype html>+<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">+<link rel="icon" href="data:,"><title>${escapeHtml(title(audit))}</title><style>${STYLE}</style></head>+<body><main>+<h1>${escapeHtml(title(audit))}</h1>+<div class="meta">${meta}</div>+<div class="phases">${phases}</div>+${errors.length ? `<div class="errors"><strong>findings.json has problems — these entries are not shown:</strong><ul>${errors.map((e) => `<li>${escapeHtml(e)}</li>`).join('')}</ul></div>` : ''}+${audit.summary.trim() ? `<section>${markdownToHtml(audit.summary)}</section>` : ''}+${rows ? `<table><thead><tr><th>Severity</th><th>Findings</th><th>Unverified</th></tr></thead><tbody>${rows}</tbody></table>` : `<p class="empty">${audit.final ? 'No findings.' : 'No findings yet. The audit is in its ' + PHASE_NAMES[audit.phase].toLowerCase() + ' phase.'}</p>`}+${live.map(findingHtml).join('\n')}+${gone.length ? `<details><summary>${gone.length} dismissed as false positive${gone.length > 1 ? 's' : ''}</summary>${gone.map(findingHtml).join('\n')}</details>` : ''}+</main></body></html>+`+}++export function renderMarkdown(audit) {+ const live = open(audit).sort(bySeverity)+ const gone = dismissed(audit)+ const lines = [`# ${title(audit)}`, '']+ if (audit.target.path && audit.target.path !== '.') lines.push(`- Path: \`${audit.target.path}\``)+ if (audit.target.commit) lines.push(`- Commit: \`${audit.target.commit}\``)+ if (audit.target.scope.length) lines.push(`- Scope: ${audit.target.scope.map((s) => `\`${s}\``).join(', ')}`)+ lines.push(`- Status: ${audit.final ? 'final' : `in progress (${PHASE_NAMES[audit.phase]})`}`, '')+ if (audit.summary.trim()) lines.push('## Summary', '', audit.summary.trim(), '')+ lines.push('| Severity | Findings | Unverified |', '|---|---|---|')+ for (const g of severityGroups(live)) lines.push(`| ${g.severity} | ${g.count} | ${g.unverified} |`)+ lines.push('')+ for (const f of live) {+ lines.push(`## ${f.id} · ${f.title}`, '', `- Severity: ${f.severity}`, `- Status: ${f.status}`)+ if (f.category) lines.push(`- Category: ${f.category}`)+ if (f.location.length) lines.push(`- Location: ${f.location.map((l) => `\`${locationText(l)}\``).join(', ')}`)+ lines.push('')+ for (const [title, body] of [['Description', f.description], ['Evidence', f.evidence], ['Recommendation', f.recommendation]]) {+ if (body.trim()) lines.push(`### ${title}`, '', body.trim(), '')+ }+ }+ if (gone.length) lines.push(`Dismissed as false positives: ${gone.map((f) => f.id).join(', ')}`, '')+ return lines.join('\n')+}++// ── the command ──────────────────────────────────────────────────────────────────────────────────++const packageDir = dirname(dirname(fileURLToPath(import.meta.url)))+const bundledBrowsers = join(packageDir, 'browsers')++function writeAtomic(path, content) {+ mkdirSync(dirname(path), { recursive: true })+ const tmp = join(dirname(path), `.${process.pid}.tmp`)+ writeFileSync(tmp, content)+ renameSync(tmp, path)+}++/**+ * The browser the PDF is printed with: $BROWSER_EXECUTABLE, this machine's Chrome or Chromium (the+ * macOS app, or on PATH), else the headless shell in browsers/ — `bundled` — which [install] fetches+ * when it is missing. Null when there is none. setup, doctor, --pdf and the tests all ask this.+ */+export function browserPath({ install = false } = {}) {+ const apps = [process.env.BROWSER_EXECUTABLE, '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', '/Applications/Chromium.app/Contents/MacOS/Chromium']+ const onPath = ['google-chrome', 'google-chrome-stable', 'chromium', 'chromium-browser']+ .flatMap((name) => (process.env.PATH ?? '').split(delimiter).filter(Boolean).map((dir) => join(dir, name)))+ const system = [...apps, ...onPath].find((path) => path && existsSync(path))+ if (system) return system+ const bundled = () => existsSync(bundledBrowsers) && readdirSync(bundledBrowsers).some((name) => name.startsWith('chromium_headless_shell-'))+ if (!bundled() && install) {+ execFileSync(process.execPath, [join(packageDir, 'node_modules', 'playwright-core', 'cli.js'), 'install', '--only-shell', 'chromium'], {+ stdio: 'ignore', env: { ...process.env, PLAYWRIGHT_BROWSERS_PATH: bundledBrowsers },+ })+ }+ return bundled() ? 'bundled' : null+}++/** Print the report page to report.pdf in headless Chrome. */+async function writePdf(workspace) {+ const path = browserPath()+ if (!path) throw new Error('no browser for the PDF report: install Chrome, or run toolchain/setup.sh')+ if (path === 'bundled') process.env.PLAYWRIGHT_BROWSERS_PATH = bundledBrowsers+ const { chromium } = await import(join(packageDir, 'node_modules', 'playwright-core', 'index.mjs'))+ const browser = await chromium.launch({ headless: true, ...(path === 'bundled' ? {} : { executablePath: path }) })+ try {+ const page = await browser.newPage()+ await page.setContent(readFileSync(join(workspace, ARTIFACT), 'utf8'), { waitUntil: 'load' })+ await page.emulateMedia({ colorScheme: 'light', media: 'print' })+ await page.pdf({ path: join(workspace, AUDIT_DIR, 'report.pdf'), format: 'A4', printBackground: true, margin: { top: '16mm', bottom: '16mm', left: '14mm', right: '14mm' } })+ } finally {+ await browser.close()+ }+}++export async function writeReport(workspace, { pdf = false, now } = {}) {+ const file = join(workspace, FINDINGS)+ const { audit, errors } = existsSync(file) ? readAudit(readFileSync(file, 'utf8')) : { audit: readAudit('{}').audit, errors: [] }+ writeAtomic(join(workspace, ARTIFACT), renderHtml(audit, { errors }))+ writeAtomic(join(workspace, AUDIT_DIR, 'report.md'), renderMarkdown(audit))+ if (pdf) await writePdf(workspace)+ const verdict = verdictFor(audit, { errors, now })+ writeAtomic(join(workspace, '.harness', 'verdict.json'), `${JSON.stringify(verdict, null, 2)}\n`)+ return { audit, errors, verdict }+}++if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url) && process.argv.includes('--browser')) {+ // setup (--install) and doctor: optional, so a missing browser is a warning, never a failure.+ let path = null+ try { path = browserPath({ install: process.argv.includes('--install') }) } catch { /* reported below */ }+ console.log(path ? `ok browser for the PDF report: ${path === 'bundled' ? 'headless Chromium in browsers/' : path}`+ : 'warn no browser for the PDF report; the HTML and Markdown reports still work')+} else if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {+ const args = process.argv.slice(2)+ const workspace = resolve(args.find((a) => !a.startsWith('--')) ?? process.cwd())+ const { errors, verdict } = await writeReport(workspace, { pdf: args.includes('--pdf') })+ for (const error of errors) console.log(`fail ${FINDINGS}: ${error}`)+ console.log(`ok ${ARTIFACT} and ${AUDIT_DIR}/report.md${args.includes('--pdf') ? ` and ${AUDIT_DIR}/report.pdf` : ''}`)+ console.log(`${verdict.ready ? 'ok ' : 'info'} verdict: ${verdict.summary}`)+ process.exitCode = errors.length ? 1 : 0+}diff --git a/store/agents/trailofbits-skills/toolchain/report.sh b/store/agents/trailofbits-skills/toolchain/report.shnew file mode 100755index 000000000..fe0da7b94--- /dev/null+++ b/store/agents/trailofbits-skills/toolchain/report.sh@@ -0,0 +1,9 @@+#!/usr/bin/env bash+# $TOB_REPORT: rebuild the report from security-audit/findings.json and refresh the verdict. Run it+# in the workspace after every change to the findings; --pdf also prints security-audit/report.pdf.+set -euo pipefail+here="$(cd "$(dirname "$0")" && pwd)"+# shellcheck source=runtimes.sh+. "$here/runtimes.sh"+harness_node 20 >/dev/null || { echo "miss node 20 or newer"; exit 1; }+exec node "$here/report.mjs" "$PWD" "$@"diff --git a/store/agents/trailofbits-skills/toolchain/runtimes.sh b/store/agents/trailofbits-skills/toolchain/runtimes.shnew file mode 100644index 000000000..7223c78dc--- /dev/null+++ b/store/agents/trailofbits-skills/toolchain/runtimes.sh@@ -0,0 +1,192 @@+# shellcheck shell=bash+# runtimes.sh — the interpreters a store package runs on, found on this machine or fetched, never+# asked of the person who pressed Get.+#+# Sourced (not run) by a package's setup, doctor and viewer scripts. A new Mac has Apple's Python 3.9,+# no Homebrew and, for most people, no Node on PATH; a package that answers "brew install [email protected]"+# has failed its install. So:+#+# harness_node 18 node >= 18 on PATH, with npm: the machine's own, else the Node Harness+# itself runs on (~/.harness/runtime/current-node, laid down with the CLI)+# harness_uv uv on PATH: the machine's own, else a pinned, checksummed release+# fetched into ~/.harness/runtime+# harness_venv DIR 3.12 [MIN [BELOW]]+# DIR is a venv on CPython 3.12, which uv downloads when the machine+# has none. A venv already there on a Python in [MIN, BELOW) is kept.+# harness_pip DIR PKG… install into that venv, through uv+# harness_micromamba micromamba, pinned and checksummed, for native libraries PyPI has+# no wheel for (pycairo on macOS)+# harness_conda_env DIR SPEC… DIR is a conda-forge environment with those packages+#+# Every function prints `miss …` and returns 1 when it cannot deliver, so `harness_node 18 || exit 1`+# reads like the rest of a setup script. Nothing here touches the user's shell profile; what it+# installs lands in ~/.harness/runtime or the package's own directory (uv keeps its download cache+# where it always does, which a venv does not depend on).+#+# ONE copy is written by hand: store/tools/runtimes.sh in the OpenHarness repository. Each package+# carries an identical copy (a package installs alone, so it cannot reach this one);+# `node store/tools/sync-runtimes.mjs` rewrites them and the CLI's store spec fails when one drifts.++HARNESS_RUNTIME="${ADAPTER_RUNTIME_DIR:-${HOME:-}/.harness/runtime}"+# The Pythons uv downloads live with Harness's other runtimes, not in uv's own ~/.local/share/uv:+# a package's venv points at its interpreter, and `uv python uninstall` there must not break it.+UV_PYTHON_INSTALL_DIR="${UV_PYTHON_INSTALL_DIR:-$HARNESS_RUNTIME/python}"+export UV_PYTHON_INSTALL_DIR+HARNESS_UV_VERSION=0.12.15+HARNESS_MICROMAMBA_VERSION=2.9.0-0++_harness_platform() {+ case "$(uname -s)-$(uname -m)" in+ Darwin-arm64) echo darwin-arm64 ;;+ Darwin-x86_64) echo darwin-x64 ;;+ Linux-x86_64) echo linux-x64 ;;+ Linux-aarch64 | Linux-arm64) echo linux-arm64 ;;+ *) return 1 ;;+ esac+}++_harness_sha256() {+ if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1+ else sha256sum "$1" | cut -d' ' -f1; fi+}++# _harness_fetch URL DEST SHA256 — DEST exists only if what arrived matches the pinned checksum.+_harness_fetch() {+ local part="$2.part.$$"+ if ! curl -fsSL --retry 3 --connect-timeout 20 --max-time 900 -o "$part" "$1"; then+ rm -f "$part"; echo "miss could not download $1 — check this machine's internet connection"; return 1+ fi+ if [ "$(_harness_sha256 "$part")" != "$3" ]; then+ rm -f "$part"; echo "miss $1 did not match its pinned checksum; nothing was installed"; return 1+ fi+ mv -f "$part" "$2"+}++_harness_node_at_least() {+ command -v node >/dev/null 2>&1 || return 1+ node -e '+ const [a, b = 0] = process.argv[1].split(".").map(Number)+ const [x, y] = process.versions.node.split(".").map(Number)+ process.exit(x > a || (x === a && y >= b) ? 0 : 1)+ ' "$1" >/dev/null 2>&1+}++harness_node() {+ local min="${1:-18}" recorded saved="$PATH" own=0+ _harness_node_at_least "$min" && own=1+ # A node without npm beside it (a distro's nodejs package) cannot run a setup's `npm ci`.+ if [ "$own" = 1 ] && command -v npm >/dev/null 2>&1; then return 0; fi+ recorded="$(cat "$HARNESS_RUNTIME/current-node" 2>/dev/null || true)"+ # Already Harness's own (a second call, or a wrapper calling a script that asks again): nothing to add.+ if [ "$own" = 1 ] && [ -n "$recorded" ] && [ "$(command -v node)" = "${recorded%/*}/node" ]; then return 0; fi+ if [ -n "$recorded" ] && [ -x "${recorded%/*}/node" ]; then+ PATH="${recorded%/*}:$PATH"; export PATH; hash -r 2>/dev/null || true+ _harness_node_at_least "$min" && return 0+ PATH="$saved"; export PATH; hash -r 2>/dev/null || true+ [ "$own" = 1 ] && return 0+ echo "miss node >= $min — this machine's newest is $("${recorded%/*}/node" -v), Harness's own; update Harness"+ return 1+ fi+ [ "$own" = 1 ] && return 0+ echo "miss node >= $min, and Harness's own Node is not in $HARNESS_RUNTIME — run \`harness start\` once to lay it down"+ return 1+}++harness_uv() {+ local dir asset sum tmp+ command -v uv >/dev/null 2>&1 && return 0+ for dir in "${HOME:-}/.local/bin" "${HOME:-}/.cargo/bin"; do+ [ -n "${HOME:-}" ] || break+ if [ -x "$dir/uv" ]; then PATH="$dir:$PATH"; export PATH; return 0; fi+ done+ dir="$HARNESS_RUNTIME/uv-$HARNESS_UV_VERSION"+ if [ ! -x "$dir/uv" ]; then+ case "$(_harness_platform)" in+ darwin-arm64) asset=uv-aarch64-apple-darwin sum=dc304b9ed1b24174572290fba60ac3f6fe63c73a671f0439e62a91375841964d ;;+ darwin-x64) asset=uv-x86_64-apple-darwin sum=e9ca61775532368fe518ab03e7a354c7ecab8ccb3c7d941c775fcc4a362b801b ;;+ linux-x64) asset=uv-x86_64-unknown-linux-gnu sum=f97935763c04be3e692460a7aaeaaab8fc3b78fcf8b389da820b38ae7423a638 ;;+ linux-arm64) asset=uv-aarch64-unknown-linux-gnu sum=0e9a3499b0587d449c9ff684c0160da607826e4af1cee220bc87f378702d3e08 ;;+ *) echo "miss uv — there is no uv release for $(uname -s) $(uname -m); install it from https://docs.astral.sh/uv/"; return 1 ;;+ esac+ echo " fetching uv $HARNESS_UV_VERSION into $HARNESS_RUNTIME (it brings Python and the packages)"+ mkdir -p "$HARNESS_RUNTIME" || { echo "miss cannot write $HARNESS_RUNTIME"; return 1; }+ tmp="$(mktemp -d "$HARNESS_RUNTIME/.uv.XXXXXX")" || { echo "miss cannot write $HARNESS_RUNTIME"; return 1; }+ if ! _harness_fetch "https://github.com/astral-sh/uv/releases/download/$HARNESS_UV_VERSION/$asset.tar.gz" "$tmp/uv.tar.gz" "$sum"; then+ rm -rf "$tmp"; return 1+ fi+ tar -xzf "$tmp/uv.tar.gz" -C "$tmp" && chmod +x "$tmp/$asset/uv" "$tmp/$asset/uvx" \+ || { rm -rf "$tmp"; echo "miss the uv archive would not unpack"; return 1; }+ # Two installs at once both get here; whichever renames first wins and the other's copy goes.+ # (mv onto a directory that exists would nest the copy inside it, hence the test.)+ [ -e "$dir" ] || mv "$tmp/$asset" "$dir" 2>/dev/null || true+ rm -rf "$tmp"+ [ -x "$dir/uv" ] || { echo "miss uv did not land in $dir"; return 1; }+ fi+ PATH="$dir:$PATH"; export PATH+}++# harness_venv DIR VERSION [MIN [BELOW]] — MIN defaults to VERSION; BELOW is exclusive and optional.+harness_venv() {+ local dir="${1:?harness_venv needs a directory}" want="${2:?harness_venv needs a Python version}"+ local min="${3:-$2}" below="${4:-}"+ if [ -x "$dir/bin/python" ] && "$dir/bin/python" -c '+import sys+at = lambda s: tuple(int(p) for p in s.split("."))+v = sys.version_info[:2]+sys.exit(0 if v >= at(sys.argv[1]) and (not sys.argv[2] or v < at(sys.argv[2])) else 1)+' "$min" "$below" 2>/dev/null; then+ echo "ok $("$dir/bin/python" --version) in $dir"+ return 0+ fi+ harness_uv || return 1+ echo " python $want in $dir (uv downloads it when this machine has none)"+ rm -rf "$dir"+ # only-managed: the same python-build-standalone interpreter on every machine, so a package tested+ # once is tested everywhere — not whichever Homebrew or pyenv Python happened to be first on PATH.+ uv venv --quiet --seed --python "$want" --python-preference only-managed "$dir" \+ || { echo "miss could not make a Python $want environment in $dir"; return 1; }+ echo "ok $("$dir/bin/python" --version) in $dir"+}++harness_pip() {+ local dir="${1:?harness_pip needs a venv}"+ shift+ harness_uv || return 1+ # uv's own error comes first; the miss line is last, so it is the line the store shows.+ uv pip install --quiet --python "$dir/bin/python" "$@" \+ || { echo "miss could not install $* into $dir"; return 1; }+}++harness_micromamba() {+ local dir asset sum+ dir="$HARNESS_RUNTIME/micromamba-$HARNESS_MICROMAMBA_VERSION"+ if [ ! -x "$dir/micromamba" ]; then+ case "$(_harness_platform)" in+ darwin-arm64) asset=micromamba-osx-arm64 sum=ec2a072f028e1a7cf20f3e2e74d5a8127cf5a5f27636375b5359811565f4e5be ;;+ darwin-x64) asset=micromamba-osx-64 sum=1e71054bb3ac9a076e21f7ec48acfef536f9b3f1408f371a942784bf5ef83d8a ;;+ linux-x64) asset=micromamba-linux-64 sum=366cd9cd8be14df1ab8ed50352a82111082a36686b2d389fdb79a92c3fafb3e3 ;;+ linux-arm64) asset=micromamba-linux-aarch64 sum=9f93b974adcb4d166996af969b6cd371287d1a3e52733704727884d9b74cb7a7 ;;+ *) echo "miss micromamba — there is no release for $(uname -s) $(uname -m)"; return 1 ;;+ esac+ echo " fetching micromamba $HARNESS_MICROMAMBA_VERSION into $HARNESS_RUNTIME (native libraries PyPI has no wheel for)"+ mkdir -p "$dir" || { echo "miss cannot write $dir"; return 1; }+ _harness_fetch "https://github.com/mamba-org/micromamba-releases/releases/download/$HARNESS_MICROMAMBA_VERSION/$asset" "$dir/micromamba.$$" "$sum" || return 1+ chmod +x "$dir/micromamba.$$" && mv -f "$dir/micromamba.$$" "$dir/micromamba" \+ || { rm -f "$dir/micromamba.$$"; echo "miss micromamba would not install into $dir"; return 1; }+ fi+ HARNESS_MICROMAMBA="$dir/micromamba"+ export HARNESS_MICROMAMBA+}++# harness_conda_env DIR SPEC… — conda-forge only, packages cached under ~/.harness/runtime/mamba.+harness_conda_env() {+ local dir="${1:?harness_conda_env needs a directory}"+ shift+ # micromamba takes a relative --prefix as a name under its root prefix and "succeeds" there.+ case "$dir" in /*) ;; *) dir="$PWD/$dir" ;; esac+ harness_micromamba || return 1+ MAMBA_ROOT_PREFIX="$HARNESS_RUNTIME/mamba" "$HARNESS_MICROMAMBA" create --yes --quiet \+ --prefix "$dir" --override-channels --channel conda-forge "$@" >/dev/null \+ && [ -d "$dir/conda-meta" ] \+ || { echo "miss could not make the conda-forge environment in $dir ($*)"; return 1; }+}diff --git a/store/agents/trailofbits-skills/toolchain/setup.sh b/store/agents/trailofbits-skills/toolchain/setup.shnew file mode 100755index 000000000..ed9927b38--- /dev/null+++ b/store/agents/trailofbits-skills/toolchain/setup.sh@@ -0,0 +1,25 @@+#!/usr/bin/env bash+# Runs once at install, cwd = the install dir. Everything lands in this package, nothing on the+# machine: Trail of Bits' plugins at the pinned commit (upstream/), a Python 3.12 venv with the+# semgrep and pip-audit their skills run (.venv/), bin/ — the one directory the agent puts in front+# of PATH for those tools, uv and python3 — and playwright-core for the PDF report (node_modules/),+# with a headless Chromium only when this machine has no Chrome (browsers/).+set -euo pipefail+cd "$(dirname "$0")/.."+# shellcheck source=runtimes.sh+. toolchain/runtimes.sh+. ./VERSIONS+toolchain/fetch-upstream.sh+harness_venv .venv 3.12 3.10 || exit 1+echo " installing semgrep ${SEMGREP_VERSION} and pip-audit ${PIP_AUDIT_VERSION} (a minute or two the first time)"+harness_pip .venv "semgrep==${SEMGREP_VERSION}" "pip-audit==${PIP_AUDIT_VERSION}" || exit 1+harness_uv || exit 1+rm -rf bin && mkdir bin+ln -s ../.venv/bin/semgrep bin/semgrep+ln -s ../.venv/bin/pip-audit bin/pip-audit+ln -s ../.venv/bin/python bin/python3+ln -s "$(command -v uv)" bin/uv+echo "ok bin/: semgrep $(bin/semgrep --version 2>/dev/null) · pip-audit · uv · python3"+harness_node 20 || exit 1+npm ci --no-audit --no-fund --loglevel=error >/dev/null || { echo "miss npm ci failed in $PWD"; exit 1; }+node toolchain/report.mjs --browser --installdiff --git a/store/branding/README.md b/store/branding/README.mdindex 7f74b80a6..dce8438b1 100644--- a/store/branding/README.md+++ b/store/branding/README.md@@ -85,6 +85,11 @@ The wrapper repositories below had no dedicated logo assets when checked on- [JUCE Agent Toolkit](https://github.com/danielraffel/juce-agent-toolkit/tree/9089b719f7378eba28dd078cdfb8b6e1c062bf13).- [SimSkill](https://github.com/qiliuchn/SimSkill-V1/tree/43d65a6fe3858af682ac99f6695310ec59dd2f52).+Trail of Bits Skills (2026-09-29) wears an original package mark — a shield with code under a+lens, MIT. [trailofbits/skills](https://github.com/trailofbits/skills/tree/82fe8226252622fa807643bdca1710901198553a)+ships no logo of its own, and Trail of Bits' company logo is theirs; the wrapper loads their plugins+without wearing their brand, and the mark is not presented as a Trail of Bits mark.+## Regenerate and checkFrom the repository root, using Node and an installed Playwright Chromium:diff --git a/store/branding/marks.json b/store/branding/marks.jsonindex 8b5534d0a..1ba3ca80a 100644--- a/store/branding/marks.json+++ b/store/branding/marks.json@@ -192,6 +192,15 @@"credit": "© 2026 OpenHarness contributors","licenseFile": "licenses/original.txt"},+ {+ "id": "autonomous/trailofbits-skills",+ "file": "trailofbits-skills.svg",+ "color": "#7fd1c7",+ "kind": "original",+ "license": "MIT",+ "credit": "© 2026 OpenHarness contributors",+ "licenseFile": "licenses/original.txt"+ },{"id": "autonomous/harness-monitor","file": "harness-monitor.svg",diff --git a/store/branding/rendered.json b/store/branding/rendered.jsonindex e266541f5..e3ca9e12e 100644--- a/store/branding/rendered.json+++ b/store/branding/rendered.json@@ -124,5 +124,11 @@"sourceSha256": "445ec79ee22691822124eafbb2774295c8475444b307c8ef95a9ce7bf5966307","pngSha256": "6d59ad9cbf8afe6e4029c7a2c2508c20cd6498ce7092382fb6f9417c5dcb032e","renderer": "AppKit"+ },+ {+ "id": "autonomous/trailofbits-skills",+ "sourceSha256": "2369e3ceabeeb694117202ebd25f889b158ac5923d84067982a60c548e59ebf9",+ "pngSha256": "289f7c3b806bcb3e2d1efce9e65435d1e9d44be938058ab6fff208031fb0323b",+ "renderer": "AppKit"}]diff --git a/store/branding/trailofbits-skills.svg b/store/branding/trailofbits-skills.svgnew file mode 100644index 000000000..18032e40c--- /dev/null+++ b/store/branding/trailofbits-skills.svg@@ -0,0 +1,8 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-labelledby="title">+ <title id="title">Trail of Bits Skills Harness package — a code audit under the lens</title>+ <rect x="2" y="2" width="60" height="60" rx="15" fill="#232a36"/>+ <path d="M32 9.5 50.5 15.8v14.6c0 11.6-7.6 19.7-18.5 23.6-10.9-3.9-18.5-12-18.5-23.6V15.8Z" fill="#dfe6ee"/>+ <path d="M22 22.5h9M22 27.5h6M22 32.5h8" stroke="#9aa6b5" stroke-width="2.2" stroke-linecap="round"/>+ <circle cx="34.5" cy="30.5" r="7" fill="#7fd1c7" fill-opacity=".35" stroke="#232a36" stroke-width="3"/>+ <path d="m39.6 35.6 5.6 5.6" stroke="#232a36" stroke-width="4" stroke-linecap="round"/>+</svg>diff --git a/store/browse-categories.json b/store/browse-categories.jsonindex ce90986cd..b30563d35 100644--- a/store/browse-categories.json+++ b/store/browse-categories.json@@ -5,7 +5,8 @@"domains": ["Code","Compute",- "Web"+ "Web",+ "Security"],"featured": []},diff --git a/store/showcase/trailofbits-skills/nodegoat-audit.jpg b/store/showcase/trailofbits-skills/nodegoat-audit.jpgnew file mode 100644index 000000000..52b691e0eBinary files /dev/null and b/store/showcase/trailofbits-skills/nodegoat-audit.jpg differ