cdxgen
Copilot instructions1.1k starsChanged 14 days agoApache-2.0View on GitHub
cdxgen is a universal polyglot CycloneDX SBOM/BOM generator written in pure ESM JavaScript targeting Node.js ≥ 20 (with optional Bun/Deno support). It produces CycloneDX JSON documents for dozens of language ecosystems. The project uses ES modules only ("type": "module"). Never generate require() calls or module.exports. The single CJS file (index.cjs) is auto-generated — do not edit it. Always use the node: protocol prefix for Node.js built-ins: Biome enforces this import order (with a blank line between each group): 1. node:*…
1 other project uses a version of this.
Trending
Quiet this year.about the whole repository
Most recently taken up by
- cdxgen/cdxgenword for word, first seen Oct 8, 2026
Who's talking about CycloneDX/cdxgen
- nodejs/node“npm on Windows fails with module not found for Node.js 22.0.0”GitHub · Apr 25, 2024 · 33 reactions
- CycloneDX/cyclonedx-go“Improve support for the `Component.Evidence.Identity` field in CycloneDX 1.6”GitHub · Jul 30, 2024 · 4 reactions
- cdxgen/cdxgen“Bazel build being run for non-Bazel projects, causing errors”GitHub · Sep 10, 2024 · 3 reactions
- cdxgen/cdxgen“[pnpm] Improve metadata collection with node_modules parsing”GitHub · Aug 7, 2025 · 2 reactions
- cdxgen/cdxgen“Add docs and fix for allowlist of hosts and commands”GitHub · Jun 29, 2025 · 2 reactions
The biggest 5 of 41 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 41
Talked about on GitHub and Bluesky (41 times).
On GitHub · 40
- Apr 25, 2024npm on Windows fails with module not found for Node.js 22.0.0 — nodejs/node33 reactions · 47 comments
- Jul 30, 2024Improve support for the `Component.Evidence.Identity` field in CycloneDX 1.6 — CycloneDX/cyclonedx-go4 reactions · 11 comments
- Sep 10, 2024Bazel build being run for non-Bazel projects, causing errors — cdxgen/cdxgen3 reactions · 3 comments
- Aug 7, 2025[pnpm] Improve metadata collection with node_modules parsing — cdxgen/cdxgen2 reactions · 6 comments
- Jun 29, 2025Add docs and fix for allowlist of hosts and commands — cdxgen/cdxgen2 reactions · 1 comment
35 more on GitHub
- May 1, 2025feat: make bazel query compatible with newer bazel versions and rules… — cdxgen/cdxgen2 reactions · 3 comments
- Oct 27, 2024Run some GitHub action jobs only on main repository — cdxgen/cdxgen2 reactions
- Jul 2, 2024Invalid Dotnet version detected and missing versions for the dependencies — cdxgen/cdxgen2 reactions · 12 comments
- Apr 22, 2024Add support for executing dependencies task in parallel for Gradle — cdxgen/cdxgen2 reactions · 6 comments
- Feb 1, 2024Added support for components properties filter — cdxgen/cdxgen2 reactions · 4 comments
- Dec 23, 2023[core] Improve exclude to match sub-directories — cdxgen/cdxgen2 reactions
- Oct 8, 2023Switching to java 21 — cdxgen/cdxgen2 reactions · 2 comments
- Sep 11, 2023Fix npm package deps tree — cdxgen/cdxgen2 reactions · 13 comments
- Jun 27, 20231.4 compatibility mode — cdxgen/cdxgen2 reactions
- May 26, 2023Even after setting CDX_MAVEN_INCLUDE_TEST_SCOPE=false some of the dependencies of test modules created in BOM — cdxgen/cdxgen2 reactions · 5 comments
- Oct 7, 2025Re-enable license fetching — MediaMarktSaturn/technolinator1 reaction · 1 comment
- Aug 15, 2025Extend data tracked for each package type and ecosystem with extra reference information — package-url/purl-spec1 reaction · 3 comments
- Jun 9, 2025bugfix: normalize component evidence identities to always be array — cdxgen/cdxgen1 reaction
- Jun 8, 2025Fix technique filtering logic by correctly checking for intersection — cdxgen/cdxgen1 reaction
- Apr 15, 2025Ignore uncommented lines in gradle build scripts — cdxgen/cdxgen1 reaction · 3 comments
- Feb 20, 2025Fix pnpm and yarn lock file detection — cdxgen/cdxgen1 reaction
- Jul 24, 2024Speed up SBOM generation by using newest features — apache/airflow1 reaction
- Jul 2, 2024Do not aggressively exclude while dealing with java projects — cdxgen/cdxgen1 reaction · 4 comments
- May 30, 2024Sanitize externalReferences URLs and exclude invalid ones + Strict JSON Schema validation — cdxgen/cdxgen1 reaction · 13 comments
- May 20, 2024Fix: Split linux-tests job into two jobs — cdxgen/cdxgen1 reaction
- Apr 30, 2024Adds a new workflow to generate SBOM — DefectDojo/django-DefectDojo1 reaction · 4 comments
- Apr 18, 2024Regenerate lock file and types. Adds vuln scanning — cdxgen/cdxgen1 reaction
- Mar 27, 2024cdx 1.6 spec support with some goodies — cdxgen/cdxgen1 reaction · 5 comments
- Jan 27, 2024Make 10.x branch the default — cdxgen/cdxgen1 reaction · 1 comment
- Jan 27, 2024Remove xml format — cdxgen/cdxgen1 reaction
- Nov 21, 2023Feature/nydus demo — cdxgen/cdxgen1 reaction
- Nov 16, 2023Fixes for Server params — cdxgen/cdxgen1 reaction · 5 comments
- Nov 15, 2023Support for private docker registry — cdxgen/cdxgen1 reaction · 2 comments
- Oct 23, 2023Generated license sometimes not valid according to BOM schema — cdxgen/cdxgen1 reaction · 6 comments
- Oct 12, 2023Filters and config files support — cdxgen/cdxgen1 reaction
- Jul 3, 2023MINOR: 9.1.0 release with deno, evidences and python dependency tree. 1 BREAKING change — cdxgen/cdxgen1 reaction · 2 comments
- Jun 30, 2023Provide possibility to define alternative NUGET API base url — cdxgen/cdxgen1 reaction · 3 comments
- May 29, 2023scanning setup.py doesn't work if "install_requires" is initialized to a variable instead of a list of strings — cdxgen/cdxgen1 reaction · 2 comments
- Mar 7, 2023Rendering multiple Subtrees in dependency tree tab of Dependency tracker — DependencyTrack/dependency-track1 reaction · 4 comments
- Feb 27, 2023Dependency Graph cannot be generated — cdxgen/cdxgen1 reaction · 11 comments
On Bluesky · 1
- Feb 4, 2025The first step towards #crypto #agility is to be able to make an inventory of all your crypto assets. Currently, there are no… — @seceng.bsky.social0 likes and reposts · 2 replies
Other versions1 project uses a version of this.
Word for word · 1
- cdxgen/cdxgen★ 1.1k100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- bom-slimmerSkill
- custom-property-authorSkill
- cyclonedx-spec-reviewerSkill
- ecosystem-onboardingSkill
- sbom-fidelity-loopSkill
- SKILL.mdSkill
The file
We split this copilot-instructions.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Always use the node: protocol prefix for Node.js built-ins:
- Distinctive: line 36
Default parameters must be last in the parameter list.
- Very specific: line 46
All public functions accept a single options plain object passed from the CLI.
≈ “Common” is an estimate: at least 1 in 5 of the 3,827 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub Copilot instructions for cdxgen
Project context
cdxgen is a universal polyglot CycloneDX SBOM/BOM generator written in pure ESM JavaScript targeting Node.js ≥ 20 (with optional Bun/Deno support). It produces CycloneDX JSON documents for dozens of language ecosystems.
Module system
The project uses ES modules only ("type": "module"). Never generate require() calls or module.exports. The single CJS file (index.cjs) is auto-generated — do not edit it.
Import style
Always use the node: protocol prefix for Node.js built-ins:
import { readFileSync, existsSync } from "node:fs";
import path from "node:path";
import process from "node:process";Biome enforces this import order (with a blank line between each group):
node:*built-ins- npm packages
- Local
./or../imports
Code style
- Formatter and linter: Biome (not ESLint/Prettier). Run
pnpm run lintto auto-fix. - Indentation: 2 spaces.
- One binding per
const/letdeclaration (useSingleVarDeclarator). - Default parameters must be last in the parameter list.
noParameterAssignis off — reassigning parameters is acceptable.noForEachis off —.forEach()is acceptable alongsidefor...of.- Suppress individual Biome rules with
// biome-ignore <rule>: <reason>comments.
Key patterns
options object threading
All public functions accept a single options plain object passed from the CLI. Never read process.argv inside library code — always use options:
export async function createJavaBom(path, options) {
if (options.deep) { … }
}Safe wrappers — always prefer these
import { safeExistsSync, safeMkdirSync, safeSpawnSync } from "../helpers/utils.js";
// NOT: existsSync, mkdirSync, spawnSync directlyPackageURL — never concatenate purl strings by hand
import { PackageURL } from "packageurl-js";
const purl = new PackageURL(type, namespace, name, version, qualifiers, subpath);
const s = purl.toString();
const obj = PackageURL.fromString(purlString);HTTP requests — use cdxgenAgent, not raw undici/fetch
import { cdxgenAgent } from "../helpers/utils.js";
// cdxgenAgent is a small undici-backed, got-compatible client
const response = await cdxgenAgent(url, { responseType: "json" });Logging
import { thoughtLog, traceLog } from "../helpers/logger.js";
import { DEBUG_MODE } from "../helpers/utils.js";
thoughtLog("Resolving transitive dependencies for", pkg.name); // debug thinking
traceLog("spawn", { command: cmd, cwd: dir }); // structured trace
if (DEBUG_MODE) console.log("verbose detail", detail);Security / secure mode
import { isSecureMode } from "../helpers/utils.js";
if (isSecureMode) return; // skip operations unsafe under --permissionFile locations
| What | Where |
| Core BOM generation per language | lib/cli/index.js (create<Language>Bom functions) |
| Lockfile / manifest parsers | lib/ecosystems/utils.js (parse* functions) |
| Shared utilities, constants, env vars | lib/ecosystems/utils.js |
| Logging | lib/core/logger.js |
| Pre-generation env setup | lib/stages/pregen/pregen.js |
| Post-generation filtering | lib/stages/postgen/postgen.js |
| HTTP server | lib/server/server.js |
Tests
Tests are co-located as <module>.poku.js files (e.g., lib/ecosystems/utils.poku.js). Use poku + esmock + sinon:
import { assert, describe, it } from "poku";
import esmock from "esmock";
import sinon from "sinon";
describe("myFunction()", () => {
it("returns expected value", async () => {
const { myFunction } = await esmock("./my-module.js", {
"../helpers/utils.js": { safeSpawnSync: sinon.stub().returns({ stdout: "" }) },
});
assert.strictEqual(myFunction("input"), "expected");
});
});Run tests: pnpm test
What NOT to generate
require()ormodule.exportsimport fs from "fs"(missingnode:prefix)- Direct
spawnSync/execSync/existsSync/mkdirSynccalls in library code - Hand-concatenated purl strings
- Direct network access (raw
undici,fetch,http/https) in library modules — usecdxgenAgent - Modifications to files under
types/(auto-generated) - Hardcoded secrets, tokens, or credentials
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

