-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Syncing changes to master for 0.1.0 (#85)
* Added requirements for environment submission. (#38) * Added contributing and codeowners files * Updated * Rename CONTRIBUTING to CONTRIBUTING.md * Updated * Added requirements for environment submission * updated * Added BeSman ML assessment environment (#41) * Added counterfit env * Updated script * Updated env name and config file * Added watchtower env script --------- Co-authored-by: Ubuntu <[email protected]> * Ml rt env update (#42) * updated config file * updated ml-rt-env config file --------- Co-authored-by: Ubuntu <[email protected]> * Updated readme and list * Improved info in config files * Updated * Updated * Updated configs * Update config (#44) * updated ML config file * updated artifat type * Update besman-ML-RT-env-config.yaml * Update besman-ML-RT-env.sh * Update besman-ML-RT-env-config.yaml * Added github id check * Update besman-ML-RT-env-config.yaml --------- Co-authored-by: Ubuntu <[email protected]> * Improvde documentation, config file informations and fixed typo in list file (#45) * Updated readme and list * Improved info in config files * Updated * Updated * Updated configs * Updated * Updated * Updated * updated config files (#49) Co-authored-by: Ubuntu <[email protected]> * Update besman-ML-RT-env.sh * Renamed classic model env * Renamed classic model env (#54) * added cosign installation for classic model (#56) * Added developer guide * Added steps for testing * Added developer guide for environments (#58) * Updated readme and list * Improved info in config files * Updated * Updated * Updated configs * Updated * Updated * Updated * Renamed classic model env * Added developer guide * Added steps for testing * Added environment metadata json * Added environment metadata json (#60) * Updated readme and list * Improved info in config files * Updated * Updated * Updated configs * Updated * Updated * Updated * Renamed classic model env * Added developer guide * Added steps for testing * Added environment metadata json * Updated version format * Updated * Adding @anilsingla * Updated version format (#62) * Updated readme and list * Improved info in config files * Updated * Updated * Updated configs * Updated * Updated * Updated * Renamed classic model env * Added developer guide * Added steps for testing * Added environment metadata json * Updated version format * Updated * Adding @anilsingla * Uploading RT ENV for Dubbo and Struts (#61) * Uploading RT ENV for Dubbo and Struts * Updating the environment-metadata.json * Updated readme file with latest avavilble env --------- Co-authored-by: Aditi Salokhe <[email protected]> * Updated format for environments * Added PyRIT RT env script (#72) * Added PyRIT RT env script * removed bash * updated version * updated conda installation and uninstallation code * Added envs for fleetbase, odxtools (#76) * made requested changes * performed requested changes * Added env for LLM scan (#70) * Added support for model scan * Updated config for PurpleLlama * Llm-Assessment -> LlmAssessment * fix code for env * Fix review comment --------- Co-authored-by: root <[email protected]> * Uploading RT Environment for Sechub (#78) * Adding logstash, prometheus, privacyidea RT env (#79) * resolving conflicts * updating logstash, prometheus * Updated info * Updated info (#80) * updated * Removed available envs section from readme (#81) * Updated info * updated * updated * updated * updated --------- Co-authored-by: Pramit Kumar Dutta <[email protected]> Co-authored-by: Ubuntu <[email protected]> Co-authored-by: ANIL SINGLA <[email protected]> Co-authored-by: Aditi Salokhe <[email protected]> Co-authored-by: Aditi Salokhe <[email protected]> Co-authored-by: Sandhya K <[email protected]> Co-authored-by: Sudhir Verma <[email protected]> Co-authored-by: root <[email protected]>
- Loading branch information
1 parent
424ab7a
commit ba98f83
Showing
40 changed files
with
3,964 additions
and
455 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
LlmAssessment/0.0.1/besman-LlmAssessment-RT-env-config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
# If you wish to update the default configuration values, copy this file and place it under your home dir, under the same name. | ||
# These variables are used to drive the installation of the environment script. | ||
# The variables that start with BESMAN_ are converted to environment vars. | ||
# If you wish to add any other vars that should be used globally, add the var using the below format. | ||
# BESMAN_<var name>: <value> | ||
# If you are not using any particular value, remove it or comment it(#). | ||
#*** - These variables should not be removed, nor left empty. | ||
|
||
# BESMAN_ARTIFACT_TYPE - project/ml model/training dataset | ||
BESMAN_ARTIFACT_TYPE: model | ||
|
||
# BESMAN_ARTIFACT_NAME - name of the artifact under assessment. | ||
BESMAN_ARTIFACT_NAME: "" #*** | ||
|
||
# BESMAN_ARTIFACT_VERSION - version of the artifact under assessment. | ||
BESMAN_ARTIFACT_VERSION: "" | ||
|
||
# BESMAN_ARTIFACT_URL - Source code url of the artifact under assessment. | ||
BESMAN_ARTIFACT_URL: "" #*** | ||
|
||
#BESMAN_ENV_NAME - This variable stores the name of the environment file. | ||
BESMAN_ENV_NAME: LlmAssessment-RT-env #*** | ||
|
||
# BESMAN_ARTIFACT_DIR - The path where you wish to clone the source code of the artifact under assessment. | ||
# If you wish to change the clone path, provide the complete path. | ||
#BESMAN_ARTIFACT_DIR: $HOME/$BESMAN_ARTIFACT_NAME #*** | ||
|
||
# BESMAN_TOOL_PATH - The path where we download the assessment and other required tools during installation. | ||
BESMAN_TOOL_PATH: /opt #*** | ||
|
||
# BESMAN_LAB_TYPE - Organization. This variable indicates the individual's lab affiliation | ||
BESMAN_LAB_TYPE: Organization #*** | ||
|
||
# BESMAN_LAB_NAME - Name of the lab. Default is Be-Secure. This variable indicates the individual's lab affiliation | ||
BESMAN_LAB_NAME: Be-Secure #*** | ||
|
||
# BESMAN_ASSESSMENT_DATASTORE_DIR - This is the local dir where we store the assessment reports. Default is home. | ||
BESMAN_ASSESSMENT_DATASTORE_DIR: $HOME/besecure-ml-assessment-datastore #*** | ||
|
||
# BESMAN_ASSESSMENT_DATASTORE_URL - The remote repo where we store the assessment reports. | ||
BESMAN_ASSESSMENT_DATASTORE_URL: https://github.com/Be-Secure/besecure-ml-assessment-datastore #*** | ||
|
||
# Remote repo from PURPLELAMA will be installed. | ||
BESMAN_PURPLELAMA_URL: https://github.com/Be-Secure/PurpleLlama.git | ||
|
||
# PURPLELAMA remote repo branch | ||
BESMAN_PURPLELAMA_BRANCH: main | ||
|
||
# Path where it should config | ||
BESMAN_PURPLELAMA_LOCAL_PATH: $HOME/LlmAssessment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/bin/bash | ||
|
||
function __besman_install | ||
{ | ||
__besman_check_github_id || return 1 | ||
__besman_echo_white "Starting PurpleLama Installation..." | ||
install_purpleLlama || return 1 | ||
__besman_echo_white "Purplelama environment installation completed!" | ||
|
||
} | ||
|
||
function __besman_uninstall | ||
{ | ||
__besman_echo_white "uninstall PurpleLama..." | ||
uninstall_PurpleLlama | ||
} | ||
|
||
function __besman_update | ||
{ | ||
echo "Reset method not implemented yet." | ||
} | ||
|
||
function __besman_validate | ||
{ | ||
echo "Reset method not implemented yet." | ||
} | ||
|
||
function __besman_reset | ||
{ | ||
echo "Reset method not implemented yet." | ||
} | ||
|
||
|
||
function install_purpleLlama() | ||
{ | ||
echo "Cloning the PurpleLama repository..." | ||
git clone --single-branch --branch $BESMAN_PURPLELAMA_BRANCH $BESMAN_PURPLELAMA_URL $BESMAN_PURPLELAMA_LOCAL_PATH | ||
if [["$?" != 0]]; then | ||
echo "error while cloning" | ||
return 1 | ||
fi | ||
echo "Installing required dependency..." | ||
sudo apt -y update | ||
sudo apt -y upgrade | ||
sudo apt install -y python3-pip | ||
apt install -y cargo | ||
apt install python3.10-venv | ||
cargo install weggli --rev=9d97d462854a9b682874b259f70cc5a97a70f2cc --git=https://github.com/weggli-rs/weggli | ||
export WEGGLI_PATH=weggli | ||
python3 -m venv ~/.venvs/CybersecurityBenchmarks | ||
source ~/.venvs/CybersecurityBenchmarks/bin/activate | ||
export DATASETS=$PWD/CybersecurityBenchmarks/datasets | ||
if [["$?" != 0]]; then | ||
echo "error while installing dependency" | ||
return 1 | ||
fi | ||
echo "Installing Python packages from requirements.txt..." | ||
cd $BESMAN_PURPLELAMA_LOCAL_PATH | ||
pip3 install -r CybersecurityBenchmarks/requirements.txt | ||
python3 -m CybersecurityBenchmarks.benchmark.run --help | ||
if [["$?" != 0]]; then | ||
echo "error while installing packages" | ||
return 1 | ||
fi | ||
} | ||
|
||
function uninstall_PurpleLlama() | ||
{ | ||
read -p "${bold}Do you want to remove the directory '$BESMAN_PURPLELAMA_LOCAL_PATH'? (y/n): " response | ||
if [[ "$response" == "y" || "$response" == "Y" || "$response" == "Yes" || "$response" == "yes" ]]; then | ||
if rm -rf $BESMAN_PURPLELAMA_LOCAL_PATH; then | ||
echo "Directory '$BESMAN_PURPLELAMA_LOCAL_PATH' has been removed." | ||
else | ||
echo "Failed to remove the directory '$BESMAN_PURPLELAMA_LOCAL_PATH'." | ||
fi | ||
else | ||
echo "Skipping the removal of '$BESMAN_PURPLELAMA_LOCAL_PATH' directory..." | ||
fi | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
# If you wish to update the default configuration values, copy this file and place it under your home dir, under the same name. | ||
# These variables are used to drive the installation of the environment script. | ||
# The variables that start with BESMAN_ are converted to environment vars. | ||
# If you wish to add any other vars that should be used globally, add the var using the below format. | ||
# BESMAN_<var name>: <value> | ||
# If you are not using any particular value, remove it or comment it(#). | ||
#*** - These variables should not be removed, nor left empty. | ||
# used to mention where you should clone the repo from, default value is Be-Secure | ||
BESMAN_ORG: Be-Secure #*** | ||
|
||
# project/ml model/training dataset | ||
BESMAN_ARTIFACT_TYPE: project | ||
|
||
# Name of the artifact under assessment. | ||
BESMAN_ARTIFACT_NAME: PyRIT #*** | ||
|
||
# Version of the artifact under assessment. | ||
BESMAN_ARTIFACT_VERSION: v0.3.0 | ||
|
||
# Source code url of the artifact under assessment. | ||
BESMAN_ARTIFACT_URL: https://github.com/Be-Secure/PyRIT #*** | ||
|
||
# This variable stores the name of the environment file. | ||
BESMAN_ENV_NAME: PyRIT-RT-env #*** | ||
|
||
# The path where you wish to clone the source code of the artifact under assessment. | ||
# If you wish to change the clone path, provide the complete path. | ||
BESMAN_ARTIFACT_DIR: $HOME/$BESMAN_ARTIFACT_NAME #*** | ||
|
||
# The path where we download the assessment and other required tools during installation. | ||
BESMAN_TOOL_PATH: /opt #*** | ||
|
||
# Organization/lab/individual. | ||
BESMAN_LAB_TYPE: Organization #*** | ||
|
||
# Name of the owner of the lab. Default is Be-Secure. | ||
BESMAN_LAB_NAME: Be-Secure #*** | ||
|
||
# This is the local dir where we store the assessment reports. Default is home. | ||
BESMAN_ASSESSMENT_DATASTORE_DIR: $HOME/besecure-assessment-datastore #*** | ||
|
||
# The remote repo where we store the assessment reports. | ||
BESMAN_ASSESSMENT_DATASTORE_URL: https://github.com/Be-Secure/besecure-assessment-datastore #*** | ||
|
||
# The path where we download the ansible role of the assessment tools and other utilities | ||
BESMAN_ANSIBLE_ROLES_PATH: $BESMAN_DIR/tmp/$BESMAN_ARTIFACT_NAME/roles #*** | ||
|
||
# The list of tools you wish to install. The tools are installed using ansible roles. | ||
# To get the list of ansible roles run | ||
# $ bes list --role | ||
#add the roles here. format - <Github id>/<repo name>,<Github id>/<repo name>,<Github id>/<repo name>,... #*** | ||
BESMAN_ANSIBLE_ROLES: Be-Secure/ansible-role-oah-sonarQube,Be-Secure/ansible-role-oah-sbomGenerator,Be-Secure/ansible-role-oah-fossology | ||
|
||
# sets the path of the playbook with which we run the ansible roles. | ||
# Default path is ~/.besman/tmp/<artifact name dir>/ | ||
BESMAN_ARTIFACT_TRIGGER_PLAYBOOK_PATH: $BESMAN_DIR/tmp/$BESMAN_ARTIFACT_NAME #*** | ||
|
||
# Name of the trigger playbook which runs the ansible roles. | ||
BESMAN_ARTIFACT_TRIGGER_PLAYBOOK: besman-$BESMAN_ARTIFACT_NAME-RT-trigger-playbook.yaml #*** | ||
|
||
# If the users likes to display all the skipped steps, set it to true. | ||
# Default value is false | ||
BESMAN_DISPLAY_SKIPPED_ANSIBLE_HOSTS: false #*** | ||
|
||
# The default values of the ansible roles will be present in their respective repos. | ||
# You can go to https://github.com/Be-Secure/<repo of the ansible role>/blob/main/defaults/main.yml. | ||
# If you wish to change the default values copy the variable from the https://github.com/Be-Secure/<repo of the ansible role>/blob/main/defaults/main.yml | ||
# and paste it here and change the value. | ||
# Format is <variable name>: <value> | ||
# Eg: openjdk_version: 11 |
Oops, something went wrong.