RepoPilotOpen in app →

cocos/cocos-engine

Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.

Healthy

Healthy across the board

worst of 4 axes
Use as dependencyConcerns

non-standard license (Other)

Fork & modifyHealthy

Has a license, tests, and CI — clean foundation to fork and modify.

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isHealthy

No critical CVEs, sane security posture — runnable as-is.

  • Last commit 3mo ago
  • 14 active contributors
  • Distributed ownership (top contributor 23% of recent commits)
Show 4 more →
  • Other licensed
  • CI configured
  • Tests present
  • Non-standard license (Other) — review terms
What would change the summary?
  • Use as dependency ConcernsMixed if: clarify license terms

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Healthy" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Healthy
[![RepoPilot: Healthy](https://repopilot.app/api/badge/cocos/cocos-engine)](https://repopilot.app/r/cocos/cocos-engine)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/cocos/cocos-engine on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: cocos/cocos-engine

Generated by RepoPilot · 2026-05-09 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/cocos/cocos-engine shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

GO — Healthy across the board

  • Last commit 3mo ago
  • 14 active contributors
  • Distributed ownership (top contributor 23% of recent commits)
  • Other licensed
  • CI configured
  • Tests present
  • ⚠ Non-standard license (Other) — review terms

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live cocos/cocos-engine repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/cocos/cocos-engine.

What it runs against: a local clone of cocos/cocos-engine — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in cocos/cocos-engine | Confirms the artifact applies here, not a fork | | 2 | License is still Other | Catches relicense before you depend on it | | 3 | Default branch v3.8.8 exists | Catches branch renames | | 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code | | 5 | Last commit ≤ 117 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>cocos/cocos-engine</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of cocos/cocos-engine. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/cocos/cocos-engine.git
#   cd cocos-engine
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of cocos/cocos-engine and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "cocos/cocos-engine(\\.git)?\\b" \\
  && ok "origin remote is cocos/cocos-engine" \\
  || miss "origin remote is not cocos/cocos-engine (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(Other)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"Other\"" package.json 2>/dev/null) \\
  && ok "license is Other" \\
  || miss "license drift — was Other at generation time"

# 3. Default branch
git rev-parse --verify v3.8.8 >/dev/null 2>&1 \\
  && ok "default branch v3.8.8 exists" \\
  || miss "default branch v3.8.8 no longer exists"

# 4. Critical files exist
test -f "cocos/2d/assembler/index.ts" \\
  && ok "cocos/2d/assembler/index.ts" \\
  || miss "missing critical file: cocos/2d/assembler/index.ts"
test -f "cocos/2d/assembler/graphics/webgl/graphics-assembler.ts" \\
  && ok "cocos/2d/assembler/graphics/webgl/graphics-assembler.ts" \\
  || miss "missing critical file: cocos/2d/assembler/graphics/webgl/graphics-assembler.ts"
test -f "cocos/2d/assembler/label/text-layout.ts" \\
  && ok "cocos/2d/assembler/label/text-layout.ts" \\
  || miss "missing critical file: cocos/2d/assembler/label/text-layout.ts"
test -f "cocos/2d/assembler/sprite/index.ts" \\
  && ok "cocos/2d/assembler/sprite/index.ts" \\
  || miss "missing critical file: cocos/2d/assembler/sprite/index.ts"
test -f ".github/workflows/native-ts-build.yml" \\
  && ok ".github/workflows/native-ts-build.yml" \\
  || miss "missing critical file: .github/workflows/native-ts-build.yml"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 117 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~87d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/cocos/cocos-engine"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

Cocos Engine is the TypeScript/C++ hybrid runtime powering Cocos Creator, a cross-platform 2D/3D game engine supporting native (Windows, Mac, iOS, Android, HarmonyOS), web (WebGL), and instant gaming platforms (WeChat Mini Games, TikTok, Facebook Instant Games). It provides a customizable render pipeline (forward/deferred), modern graphics abstraction (Vulkan/Metal/WebGL via GFX), and a scene management system with heavy lifting implemented in C++ for performance. Monorepo structured with native C++ engine core (likely in cocos/cocos-engine/native/), TypeScript/JavaScript engine bindings and editor scripts (native-bindings.yml generates these via SWIG), GitHub Actions orchestrating builds for each platform (native-compile-linux.yml, native-compile-platforms.yml), and workflow scripts for version management and interface compatibility checks.

👥Who it's for

Game developers using Cocos Creator editor who need to target multiple platforms simultaneously; engine contributors optimizing renderer performance, adding platform support, or implementing shader systems; and studios building 2D/3D games for mobile, web, and console distribution.

🌱Maturity & risk

Production-ready with strong signals: 20M+ lines of C++, 13M+ lines of TypeScript, extensive GitHub Actions CI/CD pipelines (.github/workflows/), automated testing infrastructure (run_test_cases.yml, native-unit-test.yml), and active cross-platform support (18+ native compilation workflows). This is a mature, actively maintained engine backing millions of developers.

Complexity risk from mixed C++/TypeScript codebase requiring coordination across language boundaries; maintenance surface is large with 20+ GitHub Actions workflows suggesting build/test brittleness across 10+ platforms; no visible MAINTAINERS file or single-point-of-failure obvious, but monorepo scale means coordinating native SDK versions (Android NDK, Vulkan SDK, Emscripten) is non-trivial.

Active areas of work

Active development across multiple domains: native platform build automation (native-simulator.yml, native-sync-template-version.yml), TypeScript/interface consistency checks (web-interface-check.yml, interface-check-report.js), code generation tooling (gen_decorators.js, jsonr.js), and performance/size monitoring (package-size-check.js). PR automation (native-generated-pr.yml) suggests continuous integration of native code changes.

🚀Get running

Clone the repository and set up the development environment: git clone https://github.com/cocos/cocos-engine.git && cd cocos-engine. Install Node.js matching .nvmrc version, then npm install (see .npmrc for registry config). For native development, the .github/workflows/ directory documents platform-specific setup (Android NDK cache, Vulkan SDK, Emscripten); start with npm run build for TypeScript compilation.

Daily commands: For TypeScript/Web: npm run build to compile TypeScript, then use the generated runtime in Cocos Creator. For native simulation/testing: Check .github/workflows/native-simulator.yml and native-simulator-prebuilt.yml—these likely invoke CMake builds and platform-specific SDKs. For web builds targeting WebGL: the web build pipeline is defined in web-*.yml workflows, likely invoked via npm run build:web or similar (exact command requires package.json inspection).

🗺️Map of the codebase

  • cocos/2d/assembler/index.ts — Central entry point for 2D rendering assembly pipeline—every 2D component render must pass through here
  • cocos/2d/assembler/graphics/webgl/graphics-assembler.ts — Core graphics rendering implementation for WebGL; directly handles vertex/fragment buffer assembly for all vector drawing
  • cocos/2d/assembler/label/text-layout.ts — Text layout engine responsible for measuring and positioning glyphs; critical dependency for all text rendering systems
  • cocos/2d/assembler/sprite/index.ts — Sprite rendering coordinator; routes sprite draw calls to appropriate batch or fill strategy assemblers
  • .github/workflows/native-ts-build.yml — CI/CD pipeline definition for TypeScript native bindings compilation; governs reproducibility of engine builds
  • cc.config.json — Engine configuration schema and defaults; controls feature flags, asset pipelines, and platform behavior
  • babel.config.js — JavaScript transpilation rules for cross-platform compatibility; affects how all TypeScript transforms to runtime code

🛠️How to make changes

Add a new 2D sprite rendering strategy

  1. Create a new assembler file in the sprite directory (e.g., cocos/2d/assembler/sprite/my-strategy.ts) that exports a function matching the sprite assembler interface (cocos/2d/assembler/sprite/my-strategy.ts)
  2. Import and register your strategy in the dispatcher at cocos/2d/assembler/sprite/index.ts by adding a case condition for your sprite fill type (cocos/2d/assembler/sprite/index.ts)
  3. Implement vertex/index buffer population following the pattern in cocos/2d/assembler/sprite/simple.ts—ensure you call VB.push() and IB.push() correctly (cocos/2d/assembler/sprite/simple.ts)
  4. Add TypeScript types to cocos/2d/assembler/graphics/types.ts if introducing new buffer or attribute structures (cocos/2d/assembler/graphics/types.ts)

Add support for a new text font format

  1. Create a new font handler in cocos/2d/assembler/label/ (e.g., my-font.ts) that exports a function to load and parse your font format, similar to the TTF/BMFont pattern (cocos/2d/assembler/label/my-font.ts)
  2. Update text layout processing in cocos/2d/assembler/label/text-layout.ts to detect your font format and invoke your handler (cocos/2d/assembler/label/text-layout.ts)
  3. Extend cocos/2d/assembler/label/font-utils.ts with utility functions for glyph metrics and kerning calculations if needed (cocos/2d/assembler/label/font-utils.ts)
  4. Add type definitions for your font structure in cocos/2d/assembler/label/text-style.ts (cocos/2d/assembler/label/text-style.ts)

Add a new platform to the CI/CD pipeline

  1. Create a new workflow file at .github/workflows/native-compile-<platform>.yml that defines build steps for your target platform (or extend native-compile-platforms.yml) (.github/workflows/native-compile-platforms.yml)
  2. Define platform-specific SDK cache generation in .github/workflows/ (e.g., generate-<platform>-sdk-cache.yml) to optimize CI time (.github/workflows/generate-emsdk-cache.yml)
  3. Update the native bindings build workflow at .github/workflows/native-ts-build.yml to include your platform in the build matrix (.github/workflows/native-ts-build.yml)

Extend the engine configuration schema

  1. Add your new config property to cc.config.json with a default value (cc.config.json)
  2. Update cc.config.schema.json to define the JSON schema for validation, type, and constraints on your new property (cc.config.schema.json)
  3. Reference your config in type definitions at @types/globals.d.ts or @types/editor-extends.d.ts so TypeScript provides autocomplete (@types/globals.d.ts)

🔧Why these technologies

  • TypeScript + WebGL — Provides type safety and cross-platform graphics API abstraction; compiles to JavaScript for web and native via JSB bindings
  • Batch rendering (assembler pattern) — Reduces draw calls and GPU state changes; critical for 2D performance on mobile and low-end devices
  • Text layout engine (custom implementation) — Avoids external dependencies for text measurement; enables tight integration with sprite batch rendering and layout systems
  • Earcut polygon triangulation — Converts arbitrary vector graphics to triangles for WebGL rasterization; supports complex shape rendering
  • GitHub Actions + Docker — Enables multi-platform CI/CD (iOS, Android, web, native); reproducible hermetic builds with cached SDKs
  • JSON schema (cc.config.json) — Centralizes engine configuration with validation; allows editor and runtime to stay in sync without hardcoded constants

⚖️Trade-offs already made

  • Batch rendering by component type rather than material

    • Why: Simpler logic and faster iteration; avoids complex state sorting
    • Consequence: May produce suboptimal batching if scenes mix many sprite types; requires developer awareness of batch boundaries
  • Custom text layout instead of OS fonts

    • Why: Consistent rendering across platforms and better control over layout
    • Consequence: Higher complexity and maintenance; manual font format support (TTF, BMFont) rather than system font fallbacks
  • TypeScript → transp

    • Why: undefined
    • Consequence: undefined

🪤Traps & gotchas

Platform SDKs must match exactly: .github/workflows/generate-android-ndk-cache.yml, generate-emsdk-cache.yml, generate-vulkan-sdk-cache.yml, and generate-oh-sdk-cache.yml document these; building natively requires Android NDK, Vulkan SDK, Emscripten, and HarmonyOS SDK versions from these cached workflows. SWIG bindings (.github/workflows/native-bindings.yml) regenerate TypeScript stubs from C++—modifying either side requires running the binding generator or face runtime mismatches. .npmrc and .nvmrc are strict; .npmrc may point to internal registries, and .nvmrc pins Node.js versions to avoid TypeScript compilation issues.

🏗️Architecture

💡Concepts to learn

  • Graphics Abstraction Layer (GFX) — Cocos Engine's GFX abstracts Vulkan, Metal, and WebGL into a unified API—understanding this abstraction is essential for rendering optimizations and platform-specific debugging.
  • SWIG (Simplified Wrapper and Interface Generator) — Cocos uses SWIG to auto-generate TypeScript bindings from C++ headers—critical for understanding how engine modifications propagate to the script layer without manual binding updates.
  • Effect Format (Shader Compilation Pipeline) — Cocos' proprietary effect format compiles GLSL 300 shaders to runtime formats per-platform; understanding this pipeline is essential for material/shader contributions.
  • Render Pipeline (Forward vs. Deferred) — Cocos supports customizable forward and deferred pipelines across all platforms—contributors need to understand which pipeline applies to their performance target.
  • Monorepo with Language Heterogeneity — 20M+ C++ lines + 13M+ TypeScript lines in one repo requires careful CI/CD (18+ workflows) to avoid breaking bindings; understanding monorepo tooling (CMake, npm, SWIG) is essential.
  • Multi-Platform SDK Caching Strategy — GitHub Actions workflows generate and cache platform SDKs (Android NDK, Vulkan, Emscripten, HarmonyOS); understanding this caching pattern avoids CI failures and slow builds.
  • Scene Graph Management — Cocos' scene system is C++-native for performance; understanding node hierarchies, component patterns, and spatial queries is fundamental to engine architecture.
  • cocos/cocos-engine-projects — Official example projects demonstrating engine features; essential reference for understanding intended use patterns and testing against real-world game scenarios.
  • cocos/cocos-creator — The editor that consumes this engine as its runtime; understanding editor-engine integration points is critical for contributing rendering or scene management features.
  • godotengine/godot — Competitor with similar multi-platform architecture (C++ core + script layer); useful for design pattern and cross-platform compilation strategy comparison.
  • unity/Unity — Industry standard game engine; Cocos Creator positions itself as a lighter-weight alternative for 2D/indie games, so understanding its capabilities informs scope decisions.
  • KhronosGroup/Vulkan-Samples — Vulkan best practices reference for understanding how the GFX abstraction should efficiently map to Vulkan on Windows/Android.

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add comprehensive TypeScript type definition tests for @types/pal modules

The @types/pal directory contains critical platform abstraction layer type definitions (audio.d.ts, input.d.ts, system-info.d.ts, etc.) but there are no visible corresponding test files. For a cross-platform engine with multiple platforms (web, native, minigame), these type definitions need validation tests to catch breaking changes and ensure type safety across all platform implementations. This is especially critical given the complexity of PAL (Platform Abstraction Layer).

  • [ ] Create tests directory structure mirroring @types/pal (e.g., src/tests/pal/)
  • [ ] Add type assertion tests for each PAL module (audio.test.ts, input.test.ts, system-info.test.ts, screen-adapter.test.ts, minigame.test.ts)
  • [ ] Add tests to verify platform-specific implementations match type contracts
  • [ ] Integrate tests into existing web-npm_test.yml workflow to catch type regressions in CI

Create GitHub Action workflow for type definition compatibility checking across native platforms

The repo has native-compile workflows for Android/iOS but no dedicated workflow to validate TypeScript type definitions against native bindings. Given that @types/jsb.d.ts and @types/editor-extends.d.ts likely bind to C++ code, there's a gap in catching breaking changes to native API contracts. This could be modeled after web-interface-check.yml but for native bindings.

  • [ ] Create .github/workflows/native-types-check.yml workflow
  • [ ] Add step to validate @types/jsb.d.ts and @types/box2d-jsb.d.ts against native C++ bindings
  • [ ] Implement interface diffing similar to interface-check-report.js but for native types
  • [ ] Add PR comment output to alert contributors about native API breaking changes

Add integration tests for PAL implementations across all platform targets

The .github/workflows directory has multiple platform-specific CI workflows (simulator, android, web) but no unified test suite validating that PAL implementations (audio, input, screen-adapter, system-info, wasm, pacer) work consistently across all platforms. This is critical for a cross-platform engine where the same game code must run identically on web, native, and minigame platforms.

  • [ ] Create src/tests/pal-integration/ directory with cross-platform PAL tests
  • [ ] Add test cases for each PAL module: audio playback, input event handling, screen metrics, system detection, WASM module loading
  • [ ] Create .github/workflows/pal-integration-test.yml to run these tests against web, native simulator, and emulated mobile targets
  • [ ] Add test configuration to run on multiple browsers/platforms similar to run_test_cases.yml structure

🌿Good first issues

  • Add missing TypeScript type definitions for newly exposed C++ graphics APIs: grep .github/workflows/native-bindings.yml to find recent C++ additions, then cross-reference against native/gfx/ to add corresponding .d.ts stubs.
  • Write test cases for the effect/shader compilation pipeline: add unit tests under a test/ directory (if missing) that verify GLSL 300 → runtime shader conversion for iOS Metal and Android Vulkan paths separately.
  • Document platform-specific build quirks in a PLATFORM_BUILD_GUIDE.md: extract knowledge from .github/workflows/native-compile-.yml and .github/workflows/generate--sdk-cache.yml into a single source of truth for contributors setting up new platforms.

Top contributors

Click to expand

📝Recent commits

Click to expand
  • 411f98d — Upgrade external version (#19102) (bofeng-song)
  • b8d80cb — Add response for the keyboard "Menu" button. (#19096) (qiuguohua)
  • 1b7bbb6 — Fix the issue of unresponsive buttons on the HarmonyOS Next platform. (#19095) (qiuguohua)
  • 5844b19 — Add gamepad option (#19094) (qiuguohua)
  • cb8ff8e — Fix the issue where audio playback throws an error in HarmonyOS Next (#19090) (qiuguohua)
  • 9d1f096 — add task execution (#19083) (star-e)
  • 165978a — Fix the issue on the Android platform where removeDirectory crashes on some devices. (#19078) (bofeng-song)
  • 68bc8d2 — We need to reset skeletonCache & animCache while changing spine's skeletonData, (#19079) (bofeng-song)
  • 77f5d6e — In Spine, different animations in the skeletonData have varying bone data. (#19077) (bofeng-song)
  • 3388f57 — Fix the issue of incorrect touch position after full screen in HarmonyOS Next. (#19073) (qiuguohua)

🔒Security observations

The Cocos Engine codebase demonstrates a moderate security posture. The repository is

  • Medium · Potential Hardcoded Configuration Exposure — cc.config.json, cc.config.schema.json. The presence of 'cc.config.json' and 'cc.config.schema.json' in the root directory suggests configuration files that may contain sensitive settings. These files should be carefully reviewed to ensure no secrets, API keys, or sensitive parameters are hardcoded. Fix: Ensure all sensitive configuration values are externalized to environment variables. Use a .env file (added to .gitignore) for local development and secure secret management systems for production. Review the current config files for any hardcoded credentials.
  • Medium · Babel Configuration May Require Security Review — babel.config.js. The 'babel.config.js' file contains executable code that processes the codebase. Misconfigured Babel plugins could introduce security issues or allow code injection during the build process. Fix: Review babel.config.js to ensure only trusted plugins are used. Verify that no user input is processed without sanitization. Keep Babel and all plugins updated to their latest secure versions.
  • Medium · CI/CD Pipeline Security Considerations — .github/workflows/. Multiple CI/CD workflow files (.github/workflows/*.yml) are present. These workflows have elevated permissions and execute arbitrary code. Potential issues include: insecure secret handling, insufficient input validation in workflow triggers, and overly permissive GitHub Actions permissions. Fix: Review all workflow files for: 1) Use of GitHub secrets instead of plaintext credentials, 2) Proper access controls and branch protection rules, 3) Least privilege permissions for GitHub Actions, 4) Input validation on workflow_dispatch triggers, 5) Regular audit of third-party actions used.
  • Medium · Native Compilation Scripts Security — .github/workflows/llvm.sh, native-compile-linux.yml, native-compile-platforms.yml. Multiple native compilation and build scripts exist (.github/workflows/llvm.sh, native-compile-*.yml). These scripts execute with system-level privileges and could be vectors for supply chain attacks if dependencies are not properly verified. Fix: Implement secure build practices: 1) Verify integrity of downloaded dependencies via checksums, 2) Use pinned versions of build tools, 3) Implement build artifact signing, 4) Restrict access to build infrastructure, 5) Regular security audits of build scripts.
  • Low · Missing Security Headers Configuration — Web server configuration (not visible in provided structure). No explicit security headers configuration is visible in the provided file structure. For web-based deliverables, missing headers like CSP, X-Frame-Options, X-Content-Type-Options could be security concerns. Fix: Implement security headers for all web-served content: Content-Security-Policy, X-Frame-Options: DENY, X-Content-Type-Options: nosniff, X-XSS-Protection: 1; mode=block, Strict-Transport-Security.
  • Low · TypeScript Type Definitions for Native Bindings — @types/jsb.d.ts, @types/box2d-jsb.d.ts, @types/webGPU.d.ts. Multiple .d.ts files reference native bindings (jsb.d.ts, box2d-jsb.d.ts) and WebGL/WebGPU APIs. While type definitions themselves aren't inherently vulnerable, they should be reviewed to ensure proper type safety for security-sensitive operations. Fix: Regularly audit type definitions to ensure they accurately reflect underlying native APIs. Validate that all external API calls are properly typed and sanitized at the JavaScript/TypeScript boundary.
  • Low · Development Dependencies Not Fully Visible — package.json (content not provided). While the package.json dependency file content was not provided, this is a critical omission. The codebase uses ESLint, Babel, and various build tools that could have vulnerable transitive dependencies. Fix: Implement regular dependency scanning using tools like: 1) npm audit, 2) Snyk, 3) Dependabot, 4) npm-check-updates. Maintain lock files (package-lock.json or yarn.lock) and commit them. Regularly update dependencies and monitor for CVEs.

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Healthy signals · cocos/cocos-engine — RepoPilot