Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Read build matrix JSON explicitly (#1461)
Because we used require() to read build-matrix.json, the file could be replaced with build-matrix.json.js, allowing code injection into our CI pipelines. This fixes this vulnerability by reading the JSON text with the fs module, then explicitly parsing it, rather than relying on require(). This also changes the location of the file, to match its location in other projects. Note that this workflow is not currently giving any elevated permissions to users, so it is not currently possible to damage the repo through a PR. But this might have been possible in the past, due to organization-wide defaults for token permissions (recently fixed). No evidence has been found of past exploit. See also shaka-project/shaka-streamer#216 and shaka-project/static-ffmpeg-binaries#57
- Loading branch information