Skip to content

Commit bae637c

Browse files
committed
adds papaer artifact
0 parents  commit bae637c

277 files changed

Lines changed: 41748 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/dh.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Verification of DH Case Study
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
verify:
8+
runs-on: ubuntu-latest
9+
timeout-minutes: 10
10+
container:
11+
image: ghcr.io/viperproject/gobra@sha256:0e7419455a3648d006e8a9957380e94c1a8e52d2d4b1ce2425af852dc275fb29 # Gobra commit f21fe70
12+
steps:
13+
- name: Install prerequisites
14+
run: apt-get update && apt-get install -y git wget jq
15+
16+
- name: Checkout repo
17+
uses: actions/checkout@v3
18+
19+
- name: Install Go
20+
run: |
21+
mkdir tmp
22+
cd tmp
23+
wget --quiet https://go.dev/dl/go1.17.3.linux-amd64.tar.gz
24+
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.3.linux-amd64.tar.gz
25+
cd ../
26+
rm -rf tmp
27+
# add go to path
28+
echo "/usr/local/go/bin" >> $GITHUB_PATH
29+
30+
- name: Point Go to repo copy
31+
run: go mod edit -replace github.com/viperproject/ReusableProtocolVerificationLibrary=$GITHUB_WORKSPACE/ReusableVerificationLibrary
32+
working-directory: casestudies/dh
33+
34+
- name: Compile DH initiator & responder
35+
run: ./compile.sh
36+
working-directory: casestudies/dh
37+
38+
- name: Execute DH initiator & responder
39+
run: ./dh
40+
working-directory: casestudies/dh
41+
42+
- name: Setup verification of DH
43+
run: |
44+
./load-modules.sh "$GITHUB_WORKSPACE/.modules"
45+
mkdir -p $GITHUB_WORKSPACE/.modules/github.com/viperproject
46+
working-directory: casestudies/dh
47+
48+
- name: Link Reusable Verification Library
49+
run: ln -s $GITHUB_WORKSPACE/ReusableVerificationLibrary .modules/github.com/viperproject/ReusableProtocolVerificationLibrary
50+
51+
- name: Verify DH initiator
52+
run: |
53+
mkdir -p .gobra
54+
gobraJar="/gobra/gobra.jar"
55+
additionalGobraArgs="-I $GITHUB_WORKSPACE/casestudies/dh/.verification/precedence -I $GITHUB_WORKSPACE/.modules --module github.com/viperproject/ProtocolVerificationCaseStudies/dh --parallelizeBranches"
56+
java -Xss128m -jar $gobraJar --recursive -I ./ $additionalGobraArgs --includePackages initiator
57+
working-directory: casestudies/dh
58+
59+
- name: Verify DH responder role
60+
run: |
61+
mkdir -p .gobra
62+
gobraJar="/gobra/gobra.jar"
63+
additionalGobraArgs="-I $GITHUB_WORKSPACE/casestudies/dh/.verification/precedence -I $GITHUB_WORKSPACE/.modules --module github.com/viperproject/ProtocolVerificationCaseStudies/dh --parallelizeBranches"
64+
java -Xss128m -jar $gobraJar --recursive -I ./ $additionalGobraArgs --includePackages responder
65+
working-directory: casestudies/dh
66+
67+
- name: Verify DH trace invariants & main package
68+
run: |
69+
mkdir -p .gobra
70+
gobraJar="/gobra/gobra.jar"
71+
additionalGobraArgs="-I $GITHUB_WORKSPACE/casestudies/dh/.verification/precedence -I $GITHUB_WORKSPACE/.modules --module github.com/viperproject/ProtocolVerificationCaseStudies/dh --parallelizeBranches"
72+
# verify packages located in the current directory and in `common`:
73+
java -Xss128m -jar $gobraJar --directory ./ common -I ./ $additionalGobraArgs
74+
working-directory: casestudies/dh

.github/workflows/library.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Verification of Reusable Verification Library for Gobra
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
verify:
8+
runs-on: ubuntu-latest
9+
timeout-minutes: 10
10+
container:
11+
image: ghcr.io/viperproject/gobra@sha256:0e7419455a3648d006e8a9957380e94c1a8e52d2d4b1ce2425af852dc275fb29 # Gobra commit f21fe70
12+
steps:
13+
- name: Install git
14+
run: apt-get update && apt-get install -y git
15+
16+
- name: Checkout repo
17+
uses: actions/checkout@v3
18+
19+
- name: Verify the entire Reusable Verification Library
20+
run: ./verify.sh
21+
working-directory: ReusableVerificationLibrary

.github/workflows/nsl.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Verification of NSL Case Study
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
verify:
8+
runs-on: ubuntu-latest
9+
timeout-minutes: 10
10+
container:
11+
image: ghcr.io/viperproject/gobra@sha256:0e7419455a3648d006e8a9957380e94c1a8e52d2d4b1ce2425af852dc275fb29 # Gobra commit f21fe70
12+
steps:
13+
- name: Install prerequisites
14+
run: apt-get update && apt-get install -y git wget jq
15+
16+
- name: Checkout repo
17+
uses: actions/checkout@v3
18+
19+
- name: Install Go
20+
run: |
21+
mkdir tmp
22+
cd tmp
23+
wget --quiet https://go.dev/dl/go1.17.3.linux-amd64.tar.gz
24+
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.3.linux-amd64.tar.gz
25+
cd ../
26+
rm -rf tmp
27+
# add go to path
28+
echo "/usr/local/go/bin" >> $GITHUB_PATH
29+
30+
- name: Point Go to repo copy
31+
run: go mod edit -replace github.com/viperproject/ReusableProtocolVerificationLibrary=$GITHUB_WORKSPACE/ReusableVerificationLibrary
32+
working-directory: casestudies/nsl
33+
34+
- name: Compile NSL initiator & responder
35+
run: ./compile.sh
36+
working-directory: casestudies/nsl
37+
38+
- name: Execute NSL initiator & responder
39+
run: ./nsl
40+
working-directory: casestudies/nsl
41+
42+
- name: Setup verification of NSL
43+
run: |
44+
./load-modules.sh "$GITHUB_WORKSPACE/.modules"
45+
mkdir -p $GITHUB_WORKSPACE/.modules/github.com/viperproject
46+
working-directory: casestudies/nsl
47+
48+
- name: Link Reusable Verification Library
49+
run: ln -s $GITHUB_WORKSPACE/ReusableVerificationLibrary .modules/github.com/viperproject/ReusableProtocolVerificationLibrary
50+
51+
- name: Verify NSL initiator role 1
52+
run: |
53+
mkdir -p .gobra
54+
gobraJar="/gobra/gobra.jar"
55+
additionalGobraArgs="-I $GITHUB_WORKSPACE/casestudies/nsl/.verification/precedence -I $GITHUB_WORKSPACE/.modules --module github.com/viperproject/ProtocolVerificationCaseStudies/nsl --parallelizeBranches"
56+
java -Xss128m -jar $gobraJar --recursive -I ./ $additionalGobraArgs --includePackages initiator
57+
working-directory: casestudies/nsl
58+
59+
- name: Verify NSL initiator role 2
60+
run: |
61+
mkdir -p .gobra
62+
gobraJar="/gobra/gobra.jar"
63+
additionalGobraArgs="-I $GITHUB_WORKSPACE/casestudies/nsl/.verification/precedence -I $GITHUB_WORKSPACE/.modules --module github.com/viperproject/ProtocolVerificationCaseStudies/nsl --parallelizeBranches"
64+
java -Xss128m -jar $gobraJar --recursive -I ./ $additionalGobraArgs --includePackages initiator2
65+
working-directory: casestudies/nsl
66+
67+
- name: Verify NSL responder role
68+
run: |
69+
mkdir -p .gobra
70+
gobraJar="/gobra/gobra.jar"
71+
additionalGobraArgs="-I $GITHUB_WORKSPACE/casestudies/nsl/.verification/precedence -I $GITHUB_WORKSPACE/.modules --module github.com/viperproject/ProtocolVerificationCaseStudies/nsl --parallelizeBranches"
72+
java -Xss128m -jar $gobraJar --recursive -I ./ $additionalGobraArgs --includePackages responder
73+
working-directory: casestudies/nsl
74+
75+
- name: Verify NSL trace invariants & main package
76+
run: |
77+
mkdir -p .gobra
78+
gobraJar="/gobra/gobra.jar"
79+
additionalGobraArgs="-I $GITHUB_WORKSPACE/casestudies/nsl/.verification/precedence -I $GITHUB_WORKSPACE/.modules --module github.com/viperproject/ProtocolVerificationCaseStudies/nsl --parallelizeBranches"
80+
# verify packages located in the current directory and in `common`:
81+
java -Xss128m -jar $gobraJar --directory ./ common -I ./ $additionalGobraArgs
82+
working-directory: casestudies/nsl
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Verification of Reusable Verification Library in C
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build-verify:
8+
runs-on: ubuntu-latest
9+
timeout-minutes: 15
10+
env:
11+
VERIFAST_VERSION: 21.04
12+
steps:
13+
- name: Install prerequisites
14+
run: sudo apt-get update && sudo apt-get install -y git curl tar libgomp1
15+
16+
- name: Checkout repo
17+
uses: actions/checkout@v3
18+
19+
- name: Download and Setup VeriFast
20+
run: |
21+
curl -q -s -S -L --create-dirs -o VeriFast.zip https://github.com/verifast/verifast/releases/download/${{ env.VERIFAST_VERSION }}/verifast-${{ env.VERIFAST_VERSION }}-linux.tar.gz
22+
tar xzf VeriFast.zip
23+
# this creates a folder called 'verifast-${{ env.VERIFAST_VERSION }}'
24+
VERIFAST_BIN="$PWD/verifast-${{ env.VERIFAST_VERSION }}/bin"
25+
echo "$VERIFAST_BIN" >> $GITHUB_PATH
26+
27+
- name: Verify Reusable Verification Library in VeriFast
28+
run: ./verify.sh
29+
working-directory: VeriFastPrototype/reusable_verification_library

.github/workflows/verifast-nsl.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Verification of the NSL case study in C
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build-verify:
8+
runs-on: ubuntu-latest
9+
timeout-minutes: 15
10+
env:
11+
VERIFAST_VERSION: 21.04
12+
steps:
13+
- name: Install prerequisites
14+
run: sudo apt-get update && sudo apt-get install -y git curl tar libgomp1
15+
16+
- name: Checkout repo
17+
uses: actions/checkout@v3
18+
19+
- name: Download and Setup VeriFast
20+
run: |
21+
curl -q -s -S -L --create-dirs -o VeriFast.zip https://github.com/verifast/verifast/releases/download/${{ env.VERIFAST_VERSION }}/verifast-${{ env.VERIFAST_VERSION }}-linux.tar.gz
22+
tar xzf VeriFast.zip
23+
# this creates a folder called 'verifast-${{ env.VERIFAST_VERSION }}'
24+
VERIFAST_BIN="$PWD/verifast-${{ env.VERIFAST_VERSION }}/bin"
25+
echo "$VERIFAST_BIN" >> $GITHUB_PATH
26+
27+
- name: Compile and execute NSL initiator & responder
28+
run: ./execute.sh
29+
working-directory: VeriFastPrototype/nsl
30+
31+
- name: Verify NSL initiator & responder using VeriFast
32+
run: ./verify.sh
33+
working-directory: VeriFastPrototype/nsl

.github/workflows/wireguard.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Verification of WireGuard Case Study
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build-verify:
8+
runs-on: ubuntu-latest
9+
timeout-minutes: 30
10+
env:
11+
IMAGE_NAME: securityprotocolimplementations-wireguard
12+
steps:
13+
- name: Checkout repo
14+
uses: actions/checkout@v3
15+
16+
- name: Create Image ID
17+
run: |
18+
REPO_OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
19+
echo "IMAGE_ID=ghcr.io/$REPO_OWNER/${{ env.IMAGE_NAME }}" >>$GITHUB_ENV
20+
21+
- name: Image version
22+
run: |
23+
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
24+
[ "$VERSION" == "main" ] && VERSION=latest
25+
echo "IMAGE_TAG=${{ env.IMAGE_ID }}:$VERSION" >> $GITHUB_ENV
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v2
28+
29+
- name: Build image
30+
uses: docker/build-push-action@v4
31+
with:
32+
context: .
33+
load: true
34+
file: casestudies/wireguard/docker/Dockerfile
35+
tags: ${{ env.IMAGE_TAG }}
36+
labels: "runnumber=${{ github.run_id }}"
37+
push: false
38+
cache-from: type=gha, scope=${{ github.workflow }}
39+
cache-to: type=gha, scope=${{ github.workflow }}
40+
41+
- name: Execute initiator & responder
42+
run: docker run ${{ env.IMAGE_TAG }} ./test.sh
43+
44+
- name: Verify initiator & responder
45+
run: docker run ${{ env.IMAGE_TAG }} ./verify.sh
46+
47+
- name: Login to Github Packages
48+
uses: docker/login-action@v2
49+
with:
50+
registry: ghcr.io
51+
username: ${{ github.actor }}
52+
password: ${{ secrets.GITHUB_TOKEN }}
53+
54+
- name: Push image
55+
uses: docker/build-push-action@v4
56+
with:
57+
context: .
58+
file: casestudies/wireguard/docker/Dockerfile
59+
tags: ${{ env.IMAGE_TAG }}
60+
labels: "runnumber=${{ github.run_id }}"
61+
push: true
62+
cache-from: type=gha, scope=${{ github.workflow }}
63+
cache-to: type=gha, scope=${{ github.workflow }}

0 commit comments

Comments
 (0)