T08 · Insecure Dependencies
- Location
references/ONBOARDING.md:13- Finding
Unpinned Jinja2 Dependency Is Resolved and Executed at Runtime
- Content
View full analysis
/assets')) template = env.get_template('claude_md.j2') print('template loaded:', template.name) " ``` From `references/ONBOARDING.md:35`: ```bash uv run --with jinja2 python /scripts/render.py --help ``` From `references/ONBOARDING.md:42-50`: ```bash uv run --with jinja2 python /scripts/render.py \ --target claude \ --params /.kinema-params.tmp.json \ --out /.kinema-claude.draft.md uv run --with jinja2 python /scripts/render.py \ --target codex \ --params /.kinema-params.tmp.json \ --out /.kinema-agents.draft.md ``` From `SKILL.md:196-205`: ```bash uv run --with jinja2 python "/scripts/render.py" \ --target claude \ --params "/.kinema-params.tmp.json" \ --out "/.kinema-claude.draft.md" ``` The workflow also directs the user to install `uv` and retry if it is unavailable, while prohibiting direct Python invocation. From `README.md:65-66`: ```bash uv run --with jinja2 python scripts/render.py --target claude --params params.json --out CLAUDE.md uv run --with jinja2 python scripts/render.py --target codex --params params.json --out AGENTS.md ``` ### Technical Analysis The documented and ...[truncated 2591 chars]- Remediation
View remediation
' python scripts/render.py ... ``` 2. Define the renderer environment in a project dependency manifest and commit a `uv.lock` file containing the complete resolved dependency graph. 3. Run dependency installation and execution in locked or frozen mode so resolution fails rather than silently selecting newer packages. 4. Use package hashes or an integrity-verification mechanism where supported. Ensure artifacts are obtained from a trusted, authenticated package index. 5. Avoid resolving dependencies afresh during every Skill invocation. Prepare and review the execution environment during installation, then reuse the locked environment for rendering. 6. Add an automated check that rejects execution when the lockfile is missing, stale, or inconsistent with the dependency manifest. 7. Document a controlled dependency-update procedure that includes: - Reviewing release notes and dependency changes. - Regenerating the lockfile in a trusted environment. - Running security and functional tests. - Committing the reviewed lockfile with the update. 8. Consider removing the third-party runtime dependency entirely if the template can be rendered safely using a small, locally shipped implementation. Otherwise, ensure the template and all required dependencies are included and integrity-checked as part of the reviewed Skill package. ]]>
