mirror of
https://github.com/samschott/maestral.git
synced 2024-10-06 02:18:08 +03:00
revoke access token after CI run
This commit is contained in:
parent
503aff6b82
commit
4ee58fe222
11
.github/workflows/test.yml
vendored
11
.github/workflows/test.yml
vendored
@ -93,10 +93,10 @@ jobs:
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install -U .[test]
|
||||
|
||||
- name: Get short-lived Dropbox token
|
||||
- name: Get short-lived Oauth2 access token
|
||||
# We generate a short-lived auth token which is passed to the test runner as
|
||||
# an environment variable. At no point does the test code, potentially from a
|
||||
# malicious PR, get access to a long-lived token.
|
||||
# an environment variable. At no point does the test code, potentially from an
|
||||
# untrusted 3rd party, get access to a long-lived token.
|
||||
run: |
|
||||
auth_result=$(curl https://api.dropbox.com/oauth2/token \
|
||||
-d grant_type=refresh_token \
|
||||
@ -110,6 +110,11 @@ jobs:
|
||||
run: |
|
||||
pytest -v --cov=maestral --cov-report=xml tests/linked/unit
|
||||
|
||||
- name: Revoke access token
|
||||
run: |
|
||||
curl -X POST https://api.dropboxapi.com/2/auth/token/revoke \
|
||||
--header "Authorization: Bearer $DROPBOX_ACCESS_TOKEN"
|
||||
|
||||
- name: Upload Code Coverage
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
|
Loading…
Reference in New Issue
Block a user