Repository navigation
Conversation
This was referenced Oct 16, 2026
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
dunglas
marked this pull request as ready for review
October 16, 2026 12:15
| paths-ignore: | ||
| - "docs/**" | ||
| schedule: | ||
| - cron: "17 4 * * 1" |
Member
There was a problem hiding this comment.
Is there a reason for this? 😄
alexandre-daubois
approved these changes
Oct 16, 2026
dunglas
added a commit
that referenced
this pull request
Oct 16, 2026
`num_threads`, `max_threads`, `max_requests`, the worker `num` and `max_threads` options, and `php-server --worker file,N` are parsed with `strconv.ParseUint(s, 10, 32)` and then converted to `int`. On 32-bit platforms (we ship `linux/386`, `linux/arm/v6` and `linux/arm/v7` images), values between 2^31 and 2^32-1 wrap to negative numbers: `max_threads 4294967295` becomes `-1`, which means `auto`. These values are now parsed with `strconv.Atoi` through a `parseNonNegativeInt` helper. Nothing gets converted, so nothing can wrap, and out-of-range input returns a range error on every platform. Negative values are still rejected explicitly, because the runtime treats them as sentinels (auto thread count, default worker count). 64-bit builds accept the same values as before. Reported by CodeQL (`go/incorrect-integer-conversion`) while setting it up in #2720.
This branch has not been deployed
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.
CodeQL has not analyzed the repository since October 2024. Default setup is disabled, and its last C/C++ run failed because autobuild can't find the PHP headers.
This adds an advanced setup workflow that installs ZTS PHP through the existing
setup-phpaction, exportsphp-config --includesasCGO_CFLAGS, and builds both the root module andcaddy/so the tracers see the C and Go compilations. It coversactions,c-cppandgoon pull requests, pushes tomain, and weekly.Notes:
caddy/is built from its ownworking-directorybecause the Go tracer doesn't recognizego -C.frankenphp.go,worker.go, …) under their generated copies inGOCACHE, so Go alerts in those files are dropped. C sources and pure Go files (including the whole Caddy module) are covered.Running the default suites locally on top of this branch reports two issues, fixed separately:
go/zipslip, https://github.com/php/frankenphp/security/code-scanning/1)go/incorrect-integer-conversion, 7 occurrences incaddy/)