@@ -3,7 +3,6 @@ name: "security"
3
3
permissions :
4
4
actions :read
5
5
contents :read
6
- security-events :write
7
6
8
7
on :
9
8
workflow_dispatch :
@@ -23,6 +22,8 @@ concurrency:
23
22
24
23
jobs :
25
24
codeql :
25
+ permissions :
26
+ security-events :write
26
27
runs-on :${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
27
28
steps :
28
29
-name :Harden Runner
61
62
"${{ secrets.SLACK_SECURITY_FAILURE_WEBHOOK_URL }}"
62
63
63
64
trivy :
65
+ permissions :
66
+ security-events :write
64
67
runs-on :${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
65
68
steps :
66
69
-name :Harden Runner
@@ -95,13 +98,20 @@ jobs:
95
98
# protoc must be in lockstep with our dogfood Dockerfile or the
96
99
# version in the comments will differ. This is also defined in
97
100
# ci.yaml.
98
- set -x
101
+ set -euxo pipefail
99
102
cd dogfood/contents
103
+ mkdir -p /usr/local/bin
104
+ mkdir -p /usr/local/include
105
+
100
106
DOCKER_BUILDKIT=1 docker build . --target proto -t protoc
101
107
protoc_path=/usr/local/bin/protoc
102
108
docker run --rm --entrypoint cat protoc /tmp/bin/protoc > $protoc_path
103
109
chmod +x $protoc_path
104
110
protoc --version
111
+ # Copy the generated files to the include directory.
112
+ docker run --rm -v /usr/local/include:/target protoc cp -r /tmp/include/google /target/
113
+ ls -la /usr/local/include/google/protobuf/
114
+ stat /usr/local/include/google/protobuf/timestamp.proto
105
115
106
116
-name :Build Coder linux amd64 Docker image
107
117
id :build