File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
.github/actions/vagrant-setup Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 66 - name : Add vagrant to apt-get sources
77 shell : bash
88 run : |
9- curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
9+ curl -fsSL https://apt.releases.hashicorp.com/gpg -o /tmp/hashicorp.asc
10+ FINGERPRINT="798AEC654E5C15428C8E42EEAA16FCBCA621E701"
11+ # Verify the GPG key fingerprint before adding it to the keyring
12+ DOWNLOADED_FPR=$(gpg --show-keys --with-colons /tmp/hashicorp.asc | awk -F: '$1=="fpr"{print $10; exit}')
13+ if [ "$DOWNLOADED_FPR" != "$FINGERPRINT" ]; then
14+ echo "SECURITY ERROR: HashiCorp GPG key fingerprint mismatch!"
15+ exit 1
16+ fi
17+ cat /tmp/hashicorp.asc | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
1018 echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
19+ rm /tmp/hashicorp.asc
1120 - name : Install vagrant and libvirt
1221 shell : bash
1322 run : |
2635 sudo chmod a+rw /var/run/libvirt/libvirt-sock
2736 - name : Install vagrant-libvirt plugin
2837 shell : bash
29- run : vagrant plugin install vagrant-libvirt
38+ run : vagrant plugin install vagrant-libvirt
You can’t perform that action at this time.
0 commit comments