
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
@mitre/hdf-generators
Advanced tools
Generate InSpec profile stubs from HDF Baseline definitions.
Takes an HDF Baseline JSON document (requirement definitions with metadata, descriptions, and tags) and generates a complete InSpec profile directory structure:
inspec.yml — profile metadata (name, maintainer, license, version, platform supports)controls/*.rb — one control file per requirement with describe blocks, tags, and impactThis bridges from HDF's tool-agnostic baseline format to InSpec's executable compliance-as-code format.
| Package | Relationship |
|---|---|
| hdf-schema | Provides the HDFBaseline type that generators consume |
| hdf-converters | Converters produce baselines (e.g., XCCDF benchmark → HDF baseline) that generators can then turn into InSpec profiles |
| hdf-cli | hdf generate inspec-profile command wraps this library |
| hdf-mappings | Baselines may contain NIST/CCI tags from hdf-mappings |
npm install @mitre/hdf-generators
import { generateInSpecProfile } from '@mitre/hdf-generators';
import type { HDFBaseline } from '@mitre/hdf-schema';
const baseline: HDFBaseline = JSON.parse(fs.readFileSync('baseline.json', 'utf8'));
const profile = generateInSpecProfile(baseline, {
maintainer: 'MITRE SAF',
copyright: 'MITRE Corporation',
license: 'Apache-2.0',
});
// profile.inspecYml — string content for inspec.yml
// profile.controls — Map<string, string> of filename → Ruby control code
import { generateControlStub, generateInSpecYml, escapeQuotes } from '@mitre/hdf-generators';
// Generate a single control file
const ruby = generateControlStub(requirement);
// Generate inspec.yml
const yml = generateInSpecYml(baseline, { maintainer: 'Team', license: 'Apache-2.0' });
import generators "github.com/mitre/hdf-generators"
profile := generators.GenerateInSpecProfile(baseline, generators.ProfileMetadata{
Maintainer: "MITRE SAF",
License: "Apache-2.0",
})
// profile.InspecYml — string
// profile.Controls — map[string]string
hdf generate inspec-profile baseline.json output-dir/
hdf generate inspec-profile baseline.json output-dir/ --maintainer "MITRE SAF"
hdf generate inspec-profile baseline.json output-dir/ --single-file
Apache-2.0 © MITRE Corporation
FAQs
Generate InSpec profile stubs from HDF Baseline definitions
We found that @mitre/hdf-generators demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.