@mitre/hdf-generators 3.4.3 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -8
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -35,9 +35,11 @@ import type { HDFBaseline } from '@mitre/hdf-schema';
|
|
|
35
35
|
const baseline: HDFBaseline = JSON.parse(fs.readFileSync('baseline.json', 'utf8'));
|
|
36
36
|
|
|
37
37
|
const profile = generateInSpecProfile(baseline, {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
metadata: {
|
|
39
|
+
maintainer: 'MITRE SAF',
|
|
40
|
+
copyright: 'MITRE Corporation',
|
|
41
|
+
license: 'Apache-2.0',
|
|
42
|
+
},
|
|
41
43
|
});
|
|
42
44
|
|
|
43
45
|
// profile.inspecYml — string content for inspec.yml
|
|
@@ -53,17 +55,19 @@ import { generateControlStub, generateInSpecYml, escapeQuotes } from '@mitre/hdf
|
|
|
53
55
|
const ruby = generateControlStub(requirement);
|
|
54
56
|
|
|
55
57
|
// Generate inspec.yml
|
|
56
|
-
const yml = generateInSpecYml(baseline, { maintainer: 'Team', license: 'Apache-2.0' });
|
|
58
|
+
const yml = generateInSpecYml(baseline, { metadata: { maintainer: 'Team', license: 'Apache-2.0' } });
|
|
57
59
|
```
|
|
58
60
|
|
|
59
61
|
## Usage (Go)
|
|
60
62
|
|
|
61
63
|
```go
|
|
62
|
-
import generators "github.com/mitre/hdf-generators"
|
|
64
|
+
import generators "github.com/mitre/hdf-libs/hdf-generators/go/v3"
|
|
63
65
|
|
|
64
|
-
profile := generators.GenerateInSpecProfile(baseline, generators.
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
profile := generators.GenerateInSpecProfile(baseline, &generators.GeneratorOptions{
|
|
67
|
+
Metadata: &generators.ProfileMetadata{
|
|
68
|
+
Maintainer: "MITRE SAF",
|
|
69
|
+
License: "Apache-2.0",
|
|
70
|
+
},
|
|
67
71
|
})
|
|
68
72
|
// profile.InspecYml — string
|
|
69
73
|
// profile.Controls — map[string]string
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mitre/hdf-generators",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "Generate InSpec profile stubs from HDF Baseline definitions",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"author": "MITRE Corporation",
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@mitre/hdf-schema": "^3.
|
|
28
|
+
"@mitre/hdf-schema": "^3.5.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@mitre/hdf-fixtures": "^3.
|
|
31
|
+
"@mitre/hdf-fixtures": "^3.5.0"
|
|
32
32
|
},
|
|
33
33
|
"engines": {
|
|
34
34
|
"node": ">=22.0.0"
|