Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate CA certificate bundle update #34107

Merged
merged 3 commits into from
Sep 18, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
/lib/private/Profiler @CarlSchwan
/lib/public/Profiler @CarlSchwan

# Security team
resources/config/ca-bundle.crt @ChristophWurst @eneiluj @miaulalala @nickvergessen
47 changes: 47 additions & 0 deletions .github/workflows/update-cacert-bundle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
nickvergessen marked this conversation as resolved.
Show resolved Hide resolved

name: Update CA certificate bundle
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add your copyright here. I'll be fine if we could adopt spdx notation to make it shorter

# SPDX-FileCopyrightText: 2022 Your name <email>
# SPDX-License-Identifier: AGPL-3.0-or-later

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's "high" enough to have copyright


on:
workflow_dispatch:
schedule:
- cron: "5 4 * * *"

jobs:
update-ca-certificate-bundle:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
branches: ["master", "stable24", "stable23", "stable22"]

name: update-ca-certificate-bundle-${{ matrix.branches }}

steps:
- uses: actions/checkout@v3
with:
ref: ${{ matrix.branches }}
submodules: true

- name: Download CA certificate bundle from curl
run: curl --etag-compare build/ca-bundle-etag.txt --etag-save build/ca-bundle-etag.txt --output resources/config/ca-bundle.crt https://curl.se/ca/cacert.pem

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: Update CA certificate bundle
committer: GitHub <[email protected]>
author: nextcloud-command <[email protected]>
signoff: true
branch: automated/noid/${{ matrix.branches }}-update-ca-cert-bundle
title: "[${{ matrix.branches }}] Update ca-cert bundle"
body: |
Auto-generated update of CA certificate bundle from [https://curl.se/docs/caextract.html](https://curl.se/docs/caextract.html)
labels: |
dependencies
3. to review
3 changes: 0 additions & 3 deletions autotest-checkers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ php ./build/triple-dot-checker.php
RESULT=$(($RESULT+$?))
php ./build/htaccess-checker.php
RESULT=$(($RESULT+$?))
bash ./build/ca-bundle-checker.sh
RESULT=$(($RESULT+$?))
php ./build/OCPSinceChecker.php
RESULT=$(($RESULT+$?))

php ./build/files-checker.php
RESULT=$(($RESULT+$?))

Expand Down
21 changes: 0 additions & 21 deletions build/ca-bundle-checker.sh

This file was deleted.

1 change: 1 addition & 0 deletions build/ca-bundle-etag.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"3650d-5e41fd9674803"