-
Notifications
You must be signed in to change notification settings - Fork 514
local emulator security and features fixes #1247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
01ca850
client sdk local emulator
BilalG1 25f8b1c
Gate server and admin emulator requests on credential init
BilalG1 51e71cf
Resolve merge conflicts in common.ts with envVars + emulator support
BilalG1 7d9e156
local emulator image opt
BilalG1 d724eb2
emulator fixes
BilalG1 cd087c5
Merge branch 'dev' into local-emulator-image-optimization
BilalG1 784f17c
emulator: fail-fast on provision errors, diagnose smoke test failures
BilalG1 7bf4a15
emulator: make cross-arch arm64 build survive TCG
BilalG1 6c5615b
emulator: drop --jitless, capture migration errors on failure
BilalG1 2538382
ci: run arm64 emulator build on ubuntu-24.04-arm (same-arch TCG)
BilalG1 54ecd7c
emulator: bounded dep wait with per-service diagnostics
BilalG1 5c3c436
emulator: only use -cpu cortex-a72 for cross-arch TCG
BilalG1 e9dfda7
Merge remote-tracking branch 'origin/dev' into client-sdk-local-emula…
BilalG1 e636151
emulator: move arm64 back to ubicloud cross-arch, run migrations with…
BilalG1 f4aca6d
emulator: swap --jitless for --no-opt on migration exec
BilalG1 144866a
emulator: pass --no-opt on node CLI, not via NODE_OPTIONS
BilalG1 5077bb2
pr comment fixes
BilalG1 95054ca
emulator: don't strip the clickhouse binary (breaks self-extractor)
BilalG1 999843b
emulator: bump cross-arch TCG -cpu to cortex-a76 (LSE for ClickHouse)
BilalG1 0896f14
ci: skip emulator boot/verify on arm64 (cross-arch TCG)
BilalG1 44e4079
emulator: add --no-wasm-tier-up to migration exec
BilalG1 b111ef2
Merge branch 'dev' into client-sdk-local-emulator-support
BilalG1 9ec08f4
emulator: dedupe probe list, factor log-stream and console-marker hel…
BilalG1 0ffd898
Merge branch 'emulator-arm64-ubicloud-jitless' into client-sdk-local-…
BilalG1 f8524e9
Merge branch 'dev' into emulator-arm64-ubicloud-jitless
BilalG1 9f26df0
Merge branch 'emulator-arm64-ubicloud-jitless' into client-sdk-local-…
BilalG1 9e38bc6
local emulator changes
BilalG1 9cf900a
Merge remote-tracking branch 'origin/dev' into client-sdk-local-emula…
BilalG1 9431105
Revert examples/middleware to origin/dev state
BilalG1 6e34776
Randomize CRON_SECRET in local emulator entrypoint
BilalG1 576a3cc
Use console.warn for emulator-already-running notice
BilalG1 383a036
Merge branch 'dev' into client-sdk-local-emulator-support
BilalG1 e30b9e0
Inject throwaway SEED keys into emulator smoke test
BilalG1 11567e8
emulator email-rendering, pck, and stripe fixes
BilalG1 73da966
Merge remote-tracking branch 'origin/dev' into client-sdk-local-emula…
BilalG1 04640d4
fix
BilalG1 4ae826d
fix copy emulator assets
BilalG1 0d98d55
emulator stripe fixes and gh action fix
BilalG1 224bc6b
Merge branch 'dev' into client-sdk-local-emulator-support
BilalG1 75aaf0c
emulator fix ai-chat, clickhouse queries, db sync
BilalG1 fa67984
Merge branch 'client-sdk-local-emulator-support' of https://github.co…
BilalG1 9552be8
Merge remote-tracking branch 'origin/dev' into client-sdk-local-emula…
BilalG1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
local emulator changes
- Loading branch information
commit 9e38bc621103e9197086d4d78a91fdecac2a6e16
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fail fast if the extracted freestyle sources stop matching.
This stage assumes both regexes and both exact
replace()calls succeed. Ifdocker/dependencies/freestyle-mock/Dockerfilechanges formatting or theserver.listen(...)text, the build still succeeds but ships a server that keeps port8080or misses thenode_modulessymlink. Please assert each match/rewrite before writing the files.Suggested hardening
RUN node -e " \ const fs = require('fs'); \ const df = fs.readFileSync('/tmp/freestyle-mock-dockerfile', 'utf8'); \ const pkgMatch = df.match(/cat <<'EOF' > package\\.json\\n([\\s\\S]*?)\\nEOF/); \ + if (!pkgMatch) throw new Error('Could not extract package.json from freestyle mock Dockerfile'); \ fs.writeFileSync('package.json', pkgMatch[1]); \ const srvMatch = df.match(/cat <<'EOF' > server\\.mjs\\n([\\s\\S]*?)\\nEOF/); \ + if (!srvMatch) throw new Error('Could not extract server.mjs from freestyle mock Dockerfile'); \ let server = srvMatch[1]; \ - server = server.replace('server.listen(8080)', 'server.listen(process.env.PORT || 8080)'); \ + const originalServer = server; \ + server = server.replace('server.listen(8080)', 'server.listen(process.env.PORT || 8080)'); \ server = server.replace( \ 'from \"fs/promises\"', \ 'from \"fs/promises\"; import { symlinkSync } from \"fs\"' \ ); \ server = server.replace( \ 'await mkdir(workDir, { recursive: true });', \ 'await mkdir(workDir, { recursive: true }); try { symlinkSync(\"/app/freestyle-mock/node_modules\", join(workDir, \"node_modules\")); } catch {}' \ ); \ + if (server === originalServer) throw new Error('Freestyle mock patch step did not modify server.mjs'); \ fs.writeFileSync('server.mjs', server); \ "🤖 Prompt for AI Agents