plus3it / spel

STIG-Partitioned Enterprise Linux (spel)
Other
91 stars 61 forks source link

[Bug] `amigen8-build.sh` Script Attempts to Install AWS CLI Utilities On Non-AWS VM-Templates #604

Closed ferricoxide closed 1 year ago

ferricoxide commented 1 year ago

Expected behavior

Only Amazon Machine Images should have AWS utils installed

Actual behavior

All build-targets attempt to install the AWS utils

Steps to reproduce behavior

  1. Execute spel within an alternate build environment (discovered in Azure);
  2. Monitor Logs
  3. Note the attempted execution of the AWS CLI steps

Context/Specifications

Things like:

Suggestions for fix

Update the spel/scripts/amigen8-build.sh script's BuildChroot function to make execution of the

 # Invoke AWSutils installer
 bash -euxo pipefail "${ELBUILD}"/$( ComposeAWSutilsString ) || \
   err_exit "Failure encountered with AWSutils.sh"

Block conditional on the CLOUDPROVIDER being aws.

Relevant references

ferricoxide commented 1 year ago

Have opened Issue #82 in the AMIgen8 project for the creation of an AzureUtils.sh script to act as an Azure-specific analogue to the current, AWS-specific AWSutils.sh script. Once this script is merged, the fix for this project's amigen8-build.sh script will be to add branch-logic to invoke the appropriate CSP-script based on the value of the CLOUDPROVIDER variable.