Skip to content

Commit

Permalink
temporarily remove mapper course support
Browse files Browse the repository at this point in the history
Signed-off-by: Amndeep Singh Mann <amann@mitre.org>
  • Loading branch information
Amndeep7 committed Oct 8, 2024
1 parent 15bd199 commit eaaec8d
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 96 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The repository is setup to be very low overhead, we use a simple `build-lab.sh`
- <https://saf-cli.mitre.org>
- <https://github.com/mitre/saf>
- MITRE Heimdall Lite
- <https://heimdall-lite.mitre.org>
- <https://github.com/mitre/heimdall2>
- Docker Compose File which starts:
- RedHat UBI8 Container
Expand Down
52 changes: 0 additions & 52 deletions build-lab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,58 +86,6 @@ else
fi


echo -e "${LINE_ASCII_CONSOLE}\n"

# First check for Heimdall Lite repo
if ! ls -A ./dev_repos/heimdall2 &> /dev/null
then
echo -e "${VERB}Pulling down MITRE Heimdall Lite repository into the Environment.${RSET}"
git clone https://github.com/mitre/heimdall2 dev_repos/heimdall2
else
echo -e "${HIGH}MITRE Heimdall Lite repository is already present.${RSET}"
fi


echo -e "${LINE_ASCII_CONSOLE}\n"

# Then check for Node packages
if ! ls -A ./dev_repos/heimdall2/node_modules &> /dev/null
then
echo -e "${VERB}Installing required Node packages for MITRE Heimdall Lite repository.${RSET}"
cd dev_repos/heimdall2
yarn install --frozen-lockfile
cd ../..
else
echo -e "${HIGH}MITRE Heimdall Lite Node packages are already present.${RSET}"
fi


echo -e "${LINE_ASCII_CONSOLE}\n"

# First check for SAF CLI repo
if ! ls -A ./dev_repos/saf &> /dev/null
then
echo -e "${VERB}Pulling down MITRE SAF CLI repository into the Environment.${RSET}"
git clone https://github.com/mitre/saf dev_repos/saf
else
echo -e "${HIGH}MITRE SAF CLI repository is already present.${RSET}"
fi


echo -e "${LINE_ASCII_CONSOLE}\n"

# Then check for Node packages
if ! ls -A ./dev_repos/saf/node_modules &> /dev/null
then
echo -e "${VERB}Installing required Node packages for MITRE SAF CLI repository.${RSET}"
cd dev_repos/saf
npm ci
cd ../..
else
echo -e "${HIGH}MITRE SAF CLI Node packages are already present.${RSET}"
fi


echo -e "${LINE_ASCII_CONSOLE}\n"

echo -e "${VERB}Setting up the required Docker containers.${RSET}"
Expand Down
Empty file removed dev_repos/.gitkeep
Empty file.
44 changes: 0 additions & 44 deletions test-lab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ echo -e "${LINE_ASCII_CONSOLE}\n"
echo -e "${VERB}Verify the script returns the following information:
* A \"MITRE SAF\" version number.
* An \"InSpec\" version number.
* The Git integrity of the Heimdall Lite and SAF CLI repositories.
* A Node package installation verification for the the Heimdall Lite and SAF CLI repositories.
* Two running containers:
- nginx
- redhat
Expand All @@ -27,14 +25,6 @@ containersRunning=$(docker ps)
containersMissing=''
verificationSuccessful=true

cd dev_repos/heimdall2 &> /dev/null
gitIntegrityHeimdall=$(git status)
yarnCheckHeimdall=$(yarn check --verify-tree)
cd ../saf &> /dev/null
gitIntegritySaf=$(git status)
yarnCheckSaf=$(yarn check --verify-tree)
cd ../.. &> /dev/null

if [ -z "${versionSaf}" ]
then
verificationSuccessful=false
Expand All @@ -51,36 +41,6 @@ else
statusInspec="${PASS}${versionInspec}${RSET}"
fi

if ! echo "${gitIntegrityHeimdall}" | grep --silent --extended-regexp 'working tree clean'
then
verificationSuccessful=false
statusGitHeimdall="${FAIL}The Heimdall Lite repository has mismatched files.${RSET}"
else
statusGitHeimdall="${PASS}The Heimdall Lite repository is in sync with remote.${RSET}"
fi
if ! echo "${yarnCheckHeimdall}" | grep --silent --extended-regexp 'success Folder in sync'
then
verificationSuccessful=false
statusNodeHeimdall="${FAIL}The Heimdall Lite repository has mismatched Node packages.${RSET}"
else
statusNodeHeimdall="${PASS}The Heimdall Lite repository has correct Node packages.${RSET}"
fi

if ! echo "${gitIntegritySaf}" | grep --silent --extended-regexp 'working tree clean'
then
verificationSuccessful=false
statusGitSaf="${FAIL}The SAF CLI repository has mismatched files.${RSET}"
else
statusGitSaf="${PASS}The SAF CLI repository is in sync with remote.${RSET}"
fi
if ! echo "${yarnCheckSaf}" | grep --silent --extended-regexp 'success Folder in sync'
then
verificationSuccessful=false
statusNodeSaf="${FAIL}The SAF CLI repository has mismatched Node packages.${RSET}"
else
statusNodeSaf="${PASS}The SAF CLI repository has correct Node packages.${RSET}"
fi

if ! echo "${containersRunning}" | grep --silent --extended-regexp 'nginx'
then
verificationSuccessful=false
Expand All @@ -95,10 +55,6 @@ fi
echo -e "${HIGH}* MITRE SAF Version:${RSET} ${statusSaf}"
echo -e "${HIGH}* InSpec Version:${RSET} ${statusInspec}"
echo -e "${HIGH}* Docker is running the following container(s):${RSET}"
echo -e "${HIGH}* Heimdall repository integrity:${RSET} ${statusGitHeimdall}"
echo -e "${HIGH}* Heimdall Node verification:${RSET} ${statusNodeHeimdall}"
echo -e "${HIGH}* SAF CLI repository integrity:${RSET} ${statusGitSaf}"
echo -e "${HIGH}* SAF CLI Node verification:${RSET} ${statusNodeSaf}"
echo "${containersRunning}" | \
GREP_COLORS='mt=0;32' \
grep --color=always --extended-regexp \
Expand Down

0 comments on commit eaaec8d

Please sign in to comment.