safe search for text in all files e.g search for clean_up( in all the files recursive.
$ grep -nre clean_up\( --exclude-dir={proc,dev,lib,sys}
search for file and don't get into other filesystems
$ find . -xdev -name file_name*
1 Create CA | |
1.1 Create keys | |
openssl genrsa -out rootCA_key.key 2048 | |
-des3 algorithm to encrypt the key and will require you to enter a password in order for the key file to be created. | |
1.2 Create Root CA cert with constraint CA = true | |
openssl req -x509 -new -nodes -key rootCA_key.key -sha256 -days 1024 -out rootCA_crt.pem -extensions v3_ca -reqexts v3_req -config /usr/local/etc/openssl/openssl.cnf | |
2 Create SSL cert |
# Jenkins pipeline script in declarative snytax to run bandit on git repo | |
# Needs git token added to the jenkins server in credential store | |
# Runs the job in a docker so jekins should have docker installed. | |
# Need a third-party library called jenkinsci-unstashParam-library to fetch the baseline json uploaded as job parameter. | |
properties([parameters( | |
[string(defaultValue: 'NameofScan', description: 'Use only alphabets, without space', name: 'SCAN_NAME', trim: true), string(defaultValue: 'git@abc.com:test/repo1.git', description: 'Enter the "Clone with SSH" url', name: 'REPO', trim: true), | |
string(defaultValue: 'dev', description: 'Select the release branch to run scans for particular release', name: 'Branch', trim: true), | |
choice(choices: ['YES', 'NO'], description: 'Run normal scan', name: 'NORMAL_SCAN'), | |
choice(choices: ['YES', 'NO'], description: 'Run baseline scan to hide previous found issues. If you choose YES you MUST upload baseline json file in next step.', name: 'BASELINE_SCAN'), |