Repository navigation
Clear secret buffers with a wipe the compiler keeps; read-only CI token - #130
Merged
Merged
Conversation
ppk.c cleared keys and other secret data with memset. A compiler can remove a memset on a buffer that is not used again. A new function, wipe(), writes the zeros through a volatile pointer, thus the compiler keeps the writes. All the memset calls in ppk.c now use wipe(). The result of each call does not change. The Android and Apple workflows now set permissions: contents: read. The jobs only read the repository. The signing keys come from the release environment, not from the token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRUrfg8fQaXPrMeiQ9h Signed-off-by: Neo-Desktop <321592+Neo-Desktop@users.noreply.github.com>
Neo-Desktop
added a commit
that referenced
this pull request
Dec 1, 2026
GitHub's release-asset server sometimes sends HTTP 618 ("jwt:expired")
for a short time. One failed request stopped the configure step: the
libusb download in the Android build, release and device jobs, and the
Mbed TLS download in the Apple engine job and the native job (main
after #128 and #130, and the D-Modem bump pull request #129).
cmake/download.cmake has dmodem_download(), the same function as
D-Modem's (D-Modem/D-Modem#259). It tries the download again after 5,
10, 20 and 40 s and checks the SHA-256 on each attempt. libusb.cmake and
native-ssh's BundledLibssh.cmake now use it. ExternalProject unpacks the
local tarballs.
DMODEM_DOWNLOAD_CACHE (a CMake variable or an environment variable) is
a directory that keeps the tarballs. The Android and Apple jobs keep it
with actions/cache, so a build downloads them only when a version
changes.
Tested with a local server that fails the first request: the configure
step passes on the second attempt, and a second configure copies the
tarballs from the cache.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRU5FgB38hBPKmc9VHT
Signed-off-by: Neo-Desktop <321592+Neo-Desktop@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Sydney · project thread
Summary
This PR corrects the 7 open code scanning findings.
memsetmay be deleted (1 finding,native-ssh/src/ppk.c): a compiler can remove amemseton a buffer that is not used again. A new function,wipe(), writes the zeros through avolatilepointer, thus the compiler keeps them. All 25memset(…, 0, …)calls inppk.cnow usewipe(), not only the one in the finding. The result of each call does not change.android.ymlandapple.ymlnow setpermissions: contents: read. The jobs only read the repository. The signing keys come from thereleaseenvironment, not from the token.Test
native-sshbuilt with-Wall -Wextra -Werror(GCC, Linux).dmodemssh_testpasses.Generated by Claude Code