Skip to content

Commit 386f89d

Browse files
authored
Merge pull request #15
AE-1678: enable absolute paths for asset descriptors
2 parents 5395627 + 8f0c58a commit 386f89d

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

processors/report/report_create-document.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ of this repository.
3838
| param.property.selector.classification | no | Templates may introduce a set of custom properties. These properties are loaded via a dedicated set of property files qualified by this selector. | |
3939
| param.property.selector.control | no | Templates may introduce a set of custom properties. These properties are loaded via a dedicated set of property files qualified by this selector. | |
4040
| param.security.policy.file | no (VR/CR only) | The file containing the security policy configurations for the workbench. | <env.workbench.dir>/policies/security-policy/security-policy.json |
41-
| param.asset.descriptor.dir | no | The directory where the asset descriptors are located . | <env.workbench.dir>/descriptors |
42-
| param.asset.descriptor.path | yes | The path of the asset descriptor used for the document. | |
41+
| param.asset.descriptor.file | yes | The file of the asset descriptor used for the document. | |
4342
| param.reference.inventory.dir | no (VR only) | The directory of the reference inventory for the document. | |
4443
| param.reference.license.dir | no | The path to the reference license directory. | <param.reference.inventory.dir>/../licenses |
4544
| param.reference.component.dir | no | The path to the reference component directory. | <param.reference.inventory.dir>/../components |

processors/report/report_create-document.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636

3737
<!-- default values for report parameters -->
3838
<param.document.language>en</param.document.language>
39-
<param.asset.descriptor.dir>${env.workbench.dir}/descriptors</param.asset.descriptor.dir>
4039

4140
<!-- FIXME: Check whether this is required -->
4241
<param.reference.license.dir>${param.reference.inventory.dir}/../licenses</param.reference.license.dir>
@@ -85,8 +84,7 @@
8584
<argument>-Dreference.license.path=${param.reference.license.dir}</argument>
8685
<argument>-Dreference.component.path=${param.reference.component.dir}</argument>
8786
<argument>-Dparam.computed.inventory.dir=${param.computed.inventory.dir}</argument>
88-
<argument>-Dasset.descriptor.basedir=${param.asset.descriptor.dir}</argument>
89-
<argument>-Dasset.descriptor.path=${param.asset.descriptor.path}</argument>
87+
<argument>-Dasset.descriptor.file=${param.asset.descriptor.file}</argument>
9088

9189
<argument>-Dsecurity.policy.file=${param.security.policy.file}</argument>
9290
<argument>-Denv.vulnerability.mirror.dir=${env.vulnerability.mirror.dir}</argument>
@@ -123,7 +121,7 @@
123121
<configuration>
124122
<rules>
125123
<requireProperty>
126-
<property>param.asset.descriptor.path</property>
124+
<property>param.asset.descriptor.file</property>
127125
</requireProperty>
128126
<requireProperty>
129127
<property>input.inventory.file</property>

tests/scripts/cases/report/report_create-document-01.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash
22

3-
export INPUT_ASSET_DESCRIPTOR_PATH="asset-descriptor_GENERIC-vulnerability-report.yaml"
43
export INPUT_INVENTORY_FILE="$AGGREGATED_DIR_001/sample-asset-1.0/sample-asset-1.0-inventory.xls"
54
export OUTPUT_DOCUMENT_FILE="$REPORTED_DIR_001/asset-vulnerability-report.pdf"
65
export OUTPUT_COMPUTED_INVENTORY_DIR="$REPORTED_DIR_001/computed"
6+
export PARAM_ASSET_DESCRIPTOR_FILE="$EXTERNAL_WORKBENCH_DIR/descriptors/asset-descriptor_GENERIC-vulnerability-report.yaml"
77
export PARAM_REFERENCE_INVENTORY_DIR="$EXTERNAL_WORKBENCH_DIR/inventories/example-reference-inventory/inventory"
88
export PARAM_SECURITY_POLICY_FILE="$EXTERNAL_WORKBENCH_DIR/policies/security-policy/security-policy.json"
99
export PARAM_DOCUMENT_TYPE="VR"

tests/scripts/cases/report/report_create-document-02.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash
22

3-
export INPUT_ASSET_DESCRIPTOR_PATH="asset-descriptor_GENERIC-vulnerability-report.yaml"
43
export INPUT_INVENTORY_FILE="$ADVISED_DIR_002/busybox-1.35.0-enriched.xlsx"
54
export OUTPUT_DOCUMENT_FILE="$REPORTED_DIR_002/busybox-1.35.0-vulnerability-report.pdf"
65
export OUTPUT_COMPUTED_INVENTORY_DIR="$REPORTED_DIR_002/computed"
6+
export PARAM_ASSET_DESCRIPTOR_FILE="$EXTERNAL_WORKBENCH_DIR/descriptors/asset-descriptor_GENERIC-vulnerability-report.yaml"
77
export PARAM_REFERENCE_INVENTORY_DIR="$EXTERNAL_WORKBENCH_DIR/inventories/example-reference-inventory/inventory"
88
export PARAM_SECURITY_POLICY_FILE="$EXTERNAL_WORKBENCH_DIR/policies/security-policy/security-policy.json"
99
export PARAM_DOCUMENT_TYPE="VR"

tests/scripts/processors/report/report_create-document.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ run_maven_command() {
4444
[ "${DEBUG:-}" = "true" ] && CMD+=("-X")
4545
[ -n "${AE_CORE_VERSION:-}" ] && CMD+=("-Dae.core.version=$AE_CORE_VERSION")
4646
[ -n "${AE_ARTIFACT_ANALYSIS_VERSION:-}" ] && CMD+=("-Dae.artifact.analysis.version=$AE_ARTIFACT_ANALYSIS_VERSION")
47-
CMD+=("-Dparam.asset.descriptor.path=$INPUT_ASSET_DESCRIPTOR_PATH")
4847
CMD+=("-Dinput.inventory.file=$INPUT_INVENTORY_FILE")
4948
CMD+=("-Doutput.document.file=$OUTPUT_DOCUMENT_FILE")
49+
CMD+=("-Dparam.asset.descriptor.file=$PARAM_ASSET_DESCRIPTOR_FILE")
5050
CMD+=("-Dparam.computed.inventory.dir=$OUTPUT_COMPUTED_INVENTORY_DIR")
5151
CMD+=("-Dparam.reference.inventory.dir=$PARAM_REFERENCE_INVENTORY_DIR")
5252
CMD+=("-Dparam.security.policy.file=$PARAM_SECURITY_POLICY_FILE")

0 commit comments

Comments
 (0)