Skip to content

Commit 1181f81

Browse files
authored
docs: Explain security advisories in README
1 parent 856ad5d commit 1181f81

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,17 @@ The tool automatically extracts file extensions from HTTP headers to ensure file
284284
**Fine-grained token limitation:** Due to a GitHub platform limitation, fine-grained personal access tokens (``github_pat_...``) cannot download attachments from private repositories directly. This affects both ``/assets/`` (images) and ``/files/`` (documents) URLs. The tool implements a workaround for image attachments using GitHub's Markdown API, which converts URLs to temporary JWT-signed URLs that can be downloaded. However, this workaround only works for images - document attachments (PDFs, text files, etc.) will fail with 404 errors when using fine-grained tokens on private repos. For full attachment support on private repositories, use a classic token (``-t``) instead of a fine-grained token (``-f``). See `#477 <https://github.com/josegonzalez/python-github-backup/issues/477>`_ for details.
285285

286286

287+
About security advisories
288+
-------------------------
289+
290+
GitHub security advisories are only available in public repositories. GitHub does not provide the respective API endpoint for private repositories.
291+
292+
Therefore the logic is implemented as follows:
293+
- Security advisories are included in the `--all` option.
294+
- If only the `--all` option was provided, backups of security advisories are skipped for private repositories.
295+
- If the `--security-advisories` option is provided (on its own or in addition to `--all`), a backup of security advisories is attempted for all repositories, with graceful handling if the GitHub API doesn't return any.
296+
297+
287298
Run in Docker container
288299
-----------------------
289300

0 commit comments

Comments
 (0)