Skip to content

Commit c890d48

Browse files
authored
ci: set permissions, pin actions, do not persists creds, add SECURITY.md (#86)
1 parent f0addca commit c890d48

File tree

6 files changed

+49
-14
lines changed

6 files changed

+49
-14
lines changed

.github/workflows/build_ci_multi.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
types: [ opened, synchronize, reopened, labeled, unlabeled ]
55
branches:
66
- main
7+
8+
permissions: {}
9+
710
env:
811
REGISTRY_USER: ${{ github.actor }}
912
REGISTRY_PASSWORD: ${{ github.token }}
@@ -30,7 +33,9 @@ jobs:
3033
podman login -u ${{secrets.QUAY_USER}} -p ${{secrets.QUAY_TOKEN}} quay.io
3134
docker login -u ${{secrets.QUAY_USER}} -p ${{secrets.QUAY_TOKEN}} quay.io
3235
- name: Checkout repository
33-
uses: actions/checkout@v3
36+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
37+
with:
38+
persist-credentials: false
3439
- run: |
3540
sudo apt-get update
3641
sudo apt-get -y install qemu-user-static buildah less git make podman clamav clamav-freshclam

.github/workflows/build_latest_release_multi.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
push:
44
tags:
55
- '*'
6+
7+
permissions: {}
8+
69
env:
710
REGISTRY_USER: ${{ github.actor }}
811
REGISTRY_PASSWORD: ${{ github.token }}
@@ -21,11 +24,12 @@ jobs:
2124
install_latest: [ true ]
2225
steps:
2326
- name: Checkout repository
24-
uses: actions/checkout@v3
27+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
2528
with:
29+
persist-credentials: false
2630
tag_name: ${{ github.ref }}
2731
- name: Log in to ghcr.io
28-
uses: redhat-actions/podman-login@v1
32+
uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1
2933
with:
3034
username: ${{ env.REGISTRY_USER }}
3135
password: ${{ env.REGISTRY_PASSWORD }}
@@ -61,7 +65,7 @@ jobs:
6165
buildah manifest push --format v2s2 --all curl-base-multi:$REL "docker://ghcr.io/curl/curl-container/curl-base-multi:${REL}"
6266
name: 'push images to github registry'
6367
- name: Install Cosign
64-
uses: sigstore/cosign-installer@main
68+
uses: sigstore/cosign-installer@d7543c93d881b35a8faa02e8e3605f69b7a1ce62 # v3
6569
- name: Write signing key to disk (only needed for `cosign sign --key`)
6670
run: echo "${{ secrets.COSIGN_PRIVATE_KEY }}" > cosign.key
6771
- name: Sign images with sigstore key

.github/workflows/build_master.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
branches:
77
- main
88

9+
permissions: {}
10+
911
env:
1012
REGISTRY_USER: ${{ github.actor }}
1113
REGISTRY_PASSWORD: ${{ github.token }}
@@ -24,11 +26,12 @@ jobs:
2426
install_latest: [ true ]
2527
steps:
2628
- name: Checkout repository
27-
uses: actions/checkout@v3
29+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
2830
with:
31+
persist-credentials: false
2932
ref: "main"
3033
- name: Log in to ghcr.io
31-
uses: redhat-actions/podman-login@v1
34+
uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1
3235
with:
3336
username: ${{ env.REGISTRY_USER }}
3437
password: ${{ env.REGISTRY_PASSWORD }}
@@ -57,7 +60,7 @@ jobs:
5760
buildah push curl:master "docker://ghcr.io/curl/curl-container/curl:master"
5861
name: 'push images to github registry'
5962
- name: Install Cosign
60-
uses: sigstore/cosign-installer@main
63+
uses: sigstore/cosign-installer@d7543c93d881b35a8faa02e8e3605f69b7a1ce62 # v3
6164
- name: Write signing key to disk (only needed for `cosign sign --key`)
6265
run: echo "${{ secrets.COSIGN_PRIVATE_KEY }}" > cosign.key
6366
- name: Sign image with a key

.github/workflows/build_master_dev.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
push:
77
branches:
88
- main
9+
10+
permissions: {}
11+
912
env:
1013
REGISTRY_USER: ${{ github.actor }}
1114
REGISTRY_PASSWORD: ${{ github.token }}
@@ -24,11 +27,12 @@ jobs:
2427
install_latest: [ true ]
2528
steps:
2629
- name: Checkout repository
27-
uses: actions/checkout@v3
30+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
2831
with:
32+
persist-credentials: false
2933
ref: "main"
3034
- name: Log in to ghcr.io
31-
uses: redhat-actions/podman-login@v1
35+
uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1
3236
with:
3337
username: ${{ env.REGISTRY_USER }}
3438
password: ${{ env.REGISTRY_PASSWORD }}
@@ -53,7 +57,7 @@ jobs:
5357
buildah push curl-dev-debian:master "docker://ghcr.io/curl/curl-container/curl-dev-debian:master"
5458
name: 'push images to github registry'
5559
- name: Install Cosign
56-
uses: sigstore/cosign-installer@main
60+
uses: sigstore/cosign-installer@d7543c93d881b35a8faa02e8e3605f69b7a1ce62 # v3
5761
- name: Write signing key to disk (only needed for `cosign sign --key`)
5862
run: echo "${{ secrets.COSIGN_PRIVATE_KEY }}" > cosign.key
5963
- name: Sign image with a key
@@ -74,7 +78,7 @@ jobs:
7478
buildah push curl-dev-fedora:master "docker://ghcr.io/curl/curl-container/curl-dev-fedora:master"
7579
name: 'push images to github registry'
7680
- name: Install Cosign
77-
uses: sigstore/cosign-installer@main
81+
uses: sigstore/cosign-installer@d7543c93d881b35a8faa02e8e3605f69b7a1ce62 # v3
7882
- name: Write signing key to disk (only needed for `cosign sign --key`)
7983
run: echo "${{ secrets.COSIGN_PRIVATE_KEY }}" > cosign.key
8084
- name: Sign image with a key

.github/workflows/build_master_multi.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
branches:
77
- main
88

9+
permissions: {}
10+
911
env:
1012
REGISTRY_USER: ${{ github.actor }}
1113
REGISTRY_PASSWORD: ${{ github.token }}
@@ -24,11 +26,12 @@ jobs:
2426
install_latest: [ true ]
2527
steps:
2628
- name: Checkout repository
27-
uses: actions/checkout@v3
29+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
2830
with:
31+
persist-credentials: false
2932
ref: "main"
3033
- name: Log in to ghcr.io
31-
uses: redhat-actions/podman-login@v1
34+
uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1
3235
with:
3336
username: ${{ env.REGISTRY_USER }}
3437
password: ${{ env.REGISTRY_PASSWORD }}
@@ -56,7 +59,7 @@ jobs:
5659
buildah manifest push --all --format v2s2 localhost/curl-multi:master "docker://ghcr.io/curl/curl-container/curl-multi:master"
5760
name: 'push multi images to github registry'
5861
- name: Install Cosign
59-
uses: sigstore/cosign-installer@main
62+
uses: sigstore/cosign-installer@d7543c93d881b35a8faa02e8e3605f69b7a1ce62 # v3
6063
- name: Write signing key to disk (only needed for `cosign sign --key`)
6164
run: echo "${{ secrets.COSIGN_PRIVATE_KEY }}" > cosign.key
6265
- name: Sign image with a key

SECURITY.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!--
2+
Copyright (C) Daniel Stenberg, <[email protected]>, et al.
3+
SPDX-License-Identifier: curl
4+
-->
5+
# Security Policy
6+
7+
See curl's
8+
[SECURITY-PROCESS.md](https://github.com/curl/curl/blob/master/docs/SECURITY-PROCESS.md)
9+
for full details.
10+
11+
## Reporting a Vulnerability
12+
13+
If you have found or just suspect a security problem somewhere in curl,
14+
report it on [https://hackerone.com/curl](https://hackerone.com/curl).
15+
16+
We treat security issues with confidentiality until controlled and disclosed responsibly.

0 commit comments

Comments
 (0)