DiamondLightSource / DiamondLightSource/python-copier-template

Jinja <3.1.5 security vulnerability

未關閉
#225 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
dependencies good first issue
主要語言
Jinja
星號
25
分支
10
平均合併
4 小時 4 分鐘
30 天內合併 PR
6

描述

https://github.com/DiamondLightSource/blueapi/security/dependabot/12

```An oversight in how the Jinja sandboxed environment detects calls to str.format allows an attacker that controls the content of a template to execute arbitrary Python code.

To exploit the vulnerability, an attacker needs to control the content of a template. Whether that is the case depends on the type of application using Jinja. This vulnerability impacts users of applications which execute untrusted templates.

Jinja's sandbox does catch calls to str.format and ensures they don't escape the sandbox. However, it's possible to store a reference to a malicious string's format method, then pass that to a filter that calls it. No such filters are built-in to Jinja, but could be present through custom filters in an application. After the fix, such indirect calls are also handled by the sandbox.```

Python-copier-template should update the version of Jinja, even if it appears to not be directly relevant.
Python-copier-template should also enable security scanning of dependencies, so that issues are caught ASAP and handled in the appropriate place

貢獻指南

開啟貢獻指南

研究方向

從儲存庫的相依性設定和 CI 設定開始;該 issue 連結到 Dependabot alert 12,並要求更新 Jinja 以及進行相依性安全性掃描。確認漏洞已獲得修補,且掃描已啟用,能夠偵測未來的相依性問題。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
security, tooling
Issue 類型
缺陷
難度
3/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。