Run OWASP ZAP scan from Jenkins

Posted on Mon 22 March 2021 in security • Tagged with jenkins, docker, bash, owasp, security, zap, dast

why

scanning your websites periodically for vulnerabilities (like the script kiddies or hackers do) is an essential task in your security strategy this Jenkins pipeline will help you to do this.

source

the sources, documentation and examples are located here


Running Ansible inside Docker

Posted on Tue 22 December 2020 in devops • Tagged with ansible, docker, bash

why

Sometimes it is important to be independent from your local dev machines setup.
I wrote a small wrapper script to run ansible tasks inside a docker container.

wrapper

#!/bin/bash
vault=~/.ansible-vault-pass
# check if argument was supplied
if [ $# -eq 0 ]
  then
    echo "No arguments supplied; usage: $0 'ansible-playbook playbook.yaml' # The QUOTES are important here! "
    exit 1
fi

if [ -f "$vault" ]; then
    docker container run -it --rm \
    -v $(pwd)/../:/data \
    -v $vault:/root/.ansible-vault-pass \
    -e ANSIBLE_VAULT_PASSWORD_FILE=/root/.ansible-vault-pass \
    cytopia/ansible:latest $1
else
    echo "$vault file does not exist."
fi