Python import does more than resolve dependencies: it executes code during module and package initialization. This behavior can trigger failures, load dynamic or native code, access resources, or change security-sensitive state before an application calls a package API. Prior work studies package selection, malicious packages, or package vulnerabilities. We present ImportMine, a study of import-related bugs and security vulnerabilities in Python software. We combine security advisories with PyPI project histories and use source and patch evidence to confirm how import activates cases, why the problem occurs, how developers fix it, and what program information is needed to explain the behavior. We retain 31 import-related advisory vulnerabilities and 38 application-data boundary cases and confirm 1,429 project-history bugs across 1,302 repositories. Among the project-history bugs activated during initialization, 97.6% stop or disrupt normal execution. In contrast, 90.0% of the 20 initialization- activated advisory vulnerabilities are High or Critical. Module-level code and package initialization activate 98.3% of the analyzed history cases. Dynamic loading is much less common, but most of its cases perform security-sensitive actions. We also find that many fixes change when an import becomes active instead of removing the dependency. Finally, we derive ImportVulBench, 228 paired pre-fix and fixed programs covering all 11 bug types.


翻译:暂无翻译

0
下载
关闭预览

相关内容

CASES:International Conference on Compilers, Architectures, and Synthesis for Embedded Systems。 Explanation:嵌入式系统编译器、体系结构和综合国际会议。 Publisher:ACM。 SIT: http://dblp.uni-trier.de/db/conf/cases/index.html
专知会员服务
113+阅读 · 2021年9月22日
Python计算导论,560页pdf,Introduction to Computing Using Python
专知会员服务
77+阅读 · 2020年5月5日
【干货书】流畅Python,766页pdf,中英文版
专知会员服务
229+阅读 · 2020年3月22日
【书籍推荐】简洁的Python编程(Clean Python),附274页pdf
专知会员服务
184+阅读 · 2020年1月1日
【2022新书】Python数学逻辑,285页pdf
专知
13+阅读 · 2022年11月24日
Python机器学习课程(代码与教程)
专知
37+阅读 · 2019年5月13日
一个牛逼的 Python 调试工具
机器学习算法与Python学习
15+阅读 · 2019年4月30日
使用Python进行图像增强
AI研习社
17+阅读 · 2018年9月30日
这可能是学习Python最好的免费在线电子书
程序猿
56+阅读 · 2018年5月17日
荐书丨Python数据分析从入门到精通
程序人生
19+阅读 · 2018年3月31日
福利 | 当Python遇上大数据与机器学习,入门so easy!
这几本Python新书特别赞
图灵教育
21+阅读 · 2018年3月1日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
VIP会员
最新内容
软件定义无人机蜂群给防空带来全新压力
专知会员服务
5+阅读 · 10月13日
《半自主无人地面战车的互操作性》66页
专知会员服务
5+阅读 · 10月13日
迈向更智慧的军事情报
专知会员服务
5+阅读 · 10月12日
《美国陆军2026年野战手册 2-0 情报》
专知会员服务
5+阅读 · 10月12日
《基于启发式算法求解武器-目标分配问题》
专知会员服务
7+阅读 · 10月12日
《美陆军最新条令出版物 2-0 情报》
专知会员服务
8+阅读 · 10月10日
电子战测试与训练靶场:战前验证战备状态
专知会员服务
3+阅读 · 10月10日
《美国陆军如何作战》46页最新报告
专知会员服务
9+阅读 · 10月10日
相关资讯
【2022新书】Python数学逻辑,285页pdf
专知
13+阅读 · 2022年11月24日
Python机器学习课程(代码与教程)
专知
37+阅读 · 2019年5月13日
一个牛逼的 Python 调试工具
机器学习算法与Python学习
15+阅读 · 2019年4月30日
使用Python进行图像增强
AI研习社
17+阅读 · 2018年9月30日
这可能是学习Python最好的免费在线电子书
程序猿
56+阅读 · 2018年5月17日
荐书丨Python数据分析从入门到精通
程序人生
19+阅读 · 2018年3月31日
福利 | 当Python遇上大数据与机器学习,入门so easy!
这几本Python新书特别赞
图灵教育
21+阅读 · 2018年3月1日
相关基金
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员