Skip to content

Commit

Permalink
fix: Address GitHub workaround for CVE-2022-24765.
Browse files Browse the repository at this point in the history
This commit:
- updates GH Actions checkout to v3
- apply additional work around stated in actions/checkout#766

This fixes the problem with the following error message:
```
fatal: unsafe repository ('/github/workspace' is owned by someone else)
To add an exception for this directory, call:

    git config --global --add safe.directory /github/workspace
```

The problem is due to the security fix from the Git security vulnerability
recently announced:
https://github.blog/2022-04-12-git-security-vulnerability-announced/.

Relevant GH issue: actions/checkout#760
  • Loading branch information
rht committed Apr 15, 2022
1 parent 7c772a6 commit 2957a94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
name: A job to publish zulip-archive in GitHub pages
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v3
- name: Run archive
id: archive
uses: zulip/zulip-archive@master
Expand Down
3 changes: 3 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ github_personal_access_token=$4
delete_history=$5
archive_branch=$6

# See https://github.com/actions/checkout/issues/766
git config --global --add safe.directory "$GITHUB_WORKSPACE"

checked_out_repo_path="$(pwd)"
html_dir_path=$checked_out_repo_path
json_dir_path="${checked_out_repo_path}/zulip_json"
Expand Down

0 comments on commit 2957a94

Please sign in to comment.