Skip to content

Bash Networking Project Raghav Mittal #262

Bash Networking Project Raghav Mittal

Bash Networking Project Raghav Mittal #262

name: Students Presubmit Tests
on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize
jobs:
TestIntegrityCheck:
runs-on: ubuntu-latest
if: ${{ startsWith(github.head_ref, 'networking_ex/') }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Check tests integrity
run: |
H=$(find projects/bash_networking_security/test/ -type f -exec md5sum {} + | awk '{print $1}' | sort | md5sum | awk '{print $1}')
echo "Your tests hash is $H"
if [ "$H" != "27c001c54ad7bd41bf4781f947914489" ]
then
echo "Test integrity failed. Make sure your PR has not changes the 'test' directory."
exit 1
fi
NetworkingExTestBastionRotation:
needs: [TestIntegrityCheck]
runs-on: ubuntu-latest
if: ${{ startsWith(github.head_ref, 'networking_ex/') }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
COURSE_STAFF_SSH_KEY: ${{ secrets.COURSE_STAFF_SSH_KEY }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: hashicorp/setup-terraform@v2
- name: Networking Ex - VPC Check
run: |
cd projects/bash_networking_security/test
bash test_vpc.sh
- name: Networking Ex - Basion Check
run: |
mkdir -p ~/.ssh
cp projects/bash_networking_security/test/ssh_config ~/.ssh/config
cd projects/bash_networking_security/test
bash test_bastion.sh
- name: Networking Ex - Keys Rotation Check
run: |
cd projects/bash_networking_security/test
bash test_rotation.sh
NetworkingExTestTLSHandshake:
needs: [ TestIntegrityCheck ]
runs-on: ubuntu-latest
if: ${{ startsWith(github.head_ref, 'networking_ex/') }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: hashicorp/setup-terraform@v2
- uses: actions/setup-python@v1
- uses: BSFishy/pip-action@v1
with:
packages: |
aiohttp
- run: |
cd projects/bash_networking_security/tls_webserver
- name: Networking Ex - TLS Hnadshake - Getting Eve certificate
run: |
cd projects/bash_networking_security
bash test/test_tls.sh eve
- name: Networking Ex - TLS Hnadshake - Bad client test message encryption
run: |
cd projects/bash_networking_security
bash test/test_tls.sh bad-msg
- name: Networking Ex - TLS Hnadshake - Full handshake process
run: |
cd projects/bash_networking_security
bash test/test_tls.sh