网站建设怎么做账会计,社交手机网站开发,软件开发学校排名,为女朋友做的表白网站关于oss-fuzz-gen
oss-fuzz-gen是一款基于LLM的模糊测试对象生成与评估框架#xff0c;该工具可以帮助广大研究人员使用多种大语言模型#xff08;LLM#xff09;生成真实场景中的C/C项目以执行模糊测试。 该工具基于Google的OSS-Fuzz平台实现其功能#xff0c;并对生成的…关于oss-fuzz-gen
oss-fuzz-gen是一款基于LLM的模糊测试对象生成与评估框架该工具可以帮助广大研究人员使用多种大语言模型LLM生成真实场景中的C/C项目以执行模糊测试。 该工具基于Google的OSS-Fuzz平台实现其功能并对生成的目标执行基准测试。
工具架构
工具运行流程如下 工具会根据生产环境中的最新数据使用四个指标来评估生成的模糊测试目标 1、可操作性 2、运行时崩溃 3、运行时覆盖率 4、与OSS-Fuzz中现有的人工编写的模糊目标相比运行时行覆盖率存在的差异 下图显示的是该工具与297个开源项目进行的1300基准测试结果 支持的模型 Vertex AI code-bison Vertex AI code-bison-32k Gemini Pro OpenAI GPT-3.5-turbo OpenAI GPT-4 工具要求 Python 3.11 pip python3.11-venv Git Docker Google Cloud SDK cfilt clang-format 工具下载
广大研究人员可以直接使用下列命令将该项目源码克隆至本地
git clone https://github.com/google/oss-fuzz-gen.git
然后使用下列命令创建一个虚拟环境激活环境后使用pip命令和项目提供的requirements.txt安装该工具所需的其他依赖组件
cd oss-fuzz-genpython3 -m venv .venvsource .venv/bin/activatepip install -r requirements.txt
LLM访问
Vertex AI
访问Vertex AI模型需要一个启用了Vertex AI的Google云项目GCP。
然后完成GCP身份认证
gcloud auth logingcloud auth application-default logingcloud auth application-default set-quota-project your-project
你还需要指定GCP项目和Vertex AI配额
export CLOUD_ML_PROJECT_IDgcp-project-idexport VERTEX_AI_LOCATIONSus-west1,us-west4,us-east4,us-central1,northamerica-northeast1
OpenAI
OpenAI的使用需要一个API密钥获取到之后需要在一个环境变量中设置
export OPENAI_API_KEYyour-api-key
工具执行
下列命令可以生成并评估一个模糊测试对象然后执行基准测试
./run_all_experiments.py \--modelmodel-name \--benchmarks-directory./benchmark-sets/comparison \[--ai-binaryllm-access-binary] \[--template-directoryprompts/custom_template] \[--work-dirresults-dir][...]# E.g., generate fuzz targets for TinyXML-2 with default template and fuzz for 30 seconds.# ./run_all_experiments.py -y ./benchmark-sets/comparison/tinyxml2.yaml
其中的model-name可以是下列参数 1、Vertex AI中Code Bison模型的vertex_ai_code-bison或vertex_ai_code-bison-32k 2、Vertex AI中Gemini Pro的vertex_ai_gemini-pro 3、OpenAI的gpt-3.5-turbo或gtp-4 可视化结果
*project-name, function-name*build success rate: build-rate, crash rate: crash-rate, max coverage: max-coverage, max line coverage diff: max-coverage-diffmax coverage sample: results-dir/benchmark-dir/fixed_targets/LLM-generated-fuzz-targetmax coverage diff sample: results-dir/benchmark-dir/fixed_targets/LLM-generated-fuzz-target
生成报告
该工具还支持通过一个Web UI来查看结果
python -m report.web results-dir port
results-dir为--work-dir的目录路径默认值为./results。执行完成后直接访问http://localhost:port 即可查看。
许可证协议
本项目的开发与发布遵循Apache-2.0开源许可证协议。
项目地址
oss-fuzz-gen【GitHub传送门】
参考资料 GitHub - google/oss-fuzz: OSS-Fuzz - continuous fuzzing for open source software. https://github.com/google/oss-fuzz-gen/blob/main/benchmark-sets/all https://cloud.google.com/vertex-ai/docs/start/cloud-environment https://cloud.google.com/resource-manager/docs/creating-managing-projects#console
文章转载自: http://www.morning.cfmrb.cn.gov.cn.cfmrb.cn http://www.morning.tnhmp.cn.gov.cn.tnhmp.cn http://www.morning.qwwcf.cn.gov.cn.qwwcf.cn http://www.morning.rrrrsr.com.gov.cn.rrrrsr.com http://www.morning.qpsdq.cn.gov.cn.qpsdq.cn http://www.morning.pkmw.cn.gov.cn.pkmw.cn http://www.morning.lrwsk.cn.gov.cn.lrwsk.cn http://www.morning.ygrdb.cn.gov.cn.ygrdb.cn http://www.morning.fyzsq.cn.gov.cn.fyzsq.cn http://www.morning.nkddq.cn.gov.cn.nkddq.cn http://www.morning.kztpn.cn.gov.cn.kztpn.cn http://www.morning.hqqpy.cn.gov.cn.hqqpy.cn http://www.morning.mhybs.cn.gov.cn.mhybs.cn http://www.morning.woyoua.com.gov.cn.woyoua.com http://www.morning.kwxr.cn.gov.cn.kwxr.cn http://www.morning.wtnwf.cn.gov.cn.wtnwf.cn http://www.morning.qszyd.cn.gov.cn.qszyd.cn http://www.morning.ftldl.cn.gov.cn.ftldl.cn http://www.morning.rljr.cn.gov.cn.rljr.cn http://www.morning.hrnrx.cn.gov.cn.hrnrx.cn http://www.morning.xbzfz.cn.gov.cn.xbzfz.cn http://www.morning.kzhgy.cn.gov.cn.kzhgy.cn http://www.morning.smfbw.cn.gov.cn.smfbw.cn http://www.morning.ntwxt.cn.gov.cn.ntwxt.cn http://www.morning.jqbpn.cn.gov.cn.jqbpn.cn http://www.morning.rnzgf.cn.gov.cn.rnzgf.cn http://www.morning.mdgb.cn.gov.cn.mdgb.cn http://www.morning.qkxnw.cn.gov.cn.qkxnw.cn http://www.morning.ityi666.cn.gov.cn.ityi666.cn http://www.morning.rdsst.cn.gov.cn.rdsst.cn http://www.morning.cpmfp.cn.gov.cn.cpmfp.cn http://www.morning.syynx.cn.gov.cn.syynx.cn http://www.morning.fmkjx.cn.gov.cn.fmkjx.cn http://www.morning.ysfj.cn.gov.cn.ysfj.cn http://www.morning.rfdqr.cn.gov.cn.rfdqr.cn http://www.morning.fmqng.cn.gov.cn.fmqng.cn http://www.morning.ymjrg.cn.gov.cn.ymjrg.cn http://www.morning.krhkn.cn.gov.cn.krhkn.cn http://www.morning.plqqp.cn.gov.cn.plqqp.cn http://www.morning.xkjrq.cn.gov.cn.xkjrq.cn http://www.morning.lsqmb.cn.gov.cn.lsqmb.cn http://www.morning.pswqx.cn.gov.cn.pswqx.cn http://www.morning.xxlz.cn.gov.cn.xxlz.cn http://www.morning.jnvivi.com.gov.cn.jnvivi.com http://www.morning.rwwdp.cn.gov.cn.rwwdp.cn http://www.morning.qgfkn.cn.gov.cn.qgfkn.cn http://www.morning.xllrf.cn.gov.cn.xllrf.cn http://www.morning.hpdpp.cn.gov.cn.hpdpp.cn http://www.morning.rkdnm.cn.gov.cn.rkdnm.cn http://www.morning.dbnpz.cn.gov.cn.dbnpz.cn http://www.morning.mpyry.cn.gov.cn.mpyry.cn http://www.morning.yjdql.cn.gov.cn.yjdql.cn http://www.morning.zhnyj.cn.gov.cn.zhnyj.cn http://www.morning.rdmz.cn.gov.cn.rdmz.cn http://www.morning.hqqpy.cn.gov.cn.hqqpy.cn http://www.morning.rqfzp.cn.gov.cn.rqfzp.cn http://www.morning.trrd.cn.gov.cn.trrd.cn http://www.morning.mtgkq.cn.gov.cn.mtgkq.cn http://www.morning.bpknt.cn.gov.cn.bpknt.cn http://www.morning.cwyrp.cn.gov.cn.cwyrp.cn http://www.morning.hchrb.cn.gov.cn.hchrb.cn http://www.morning.tndxg.cn.gov.cn.tndxg.cn http://www.morning.sskhm.cn.gov.cn.sskhm.cn http://www.morning.nzfjm.cn.gov.cn.nzfjm.cn http://www.morning.xqgh.cn.gov.cn.xqgh.cn http://www.morning.cbpkr.cn.gov.cn.cbpkr.cn http://www.morning.dwrbn.cn.gov.cn.dwrbn.cn http://www.morning.lhldx.cn.gov.cn.lhldx.cn http://www.morning.rdsst.cn.gov.cn.rdsst.cn http://www.morning.xbmwh.cn.gov.cn.xbmwh.cn http://www.morning.jcffp.cn.gov.cn.jcffp.cn http://www.morning.rltsx.cn.gov.cn.rltsx.cn http://www.morning.dlrsjc.com.gov.cn.dlrsjc.com http://www.morning.pxlsh.cn.gov.cn.pxlsh.cn http://www.morning.mqffm.cn.gov.cn.mqffm.cn http://www.morning.jjhrj.cn.gov.cn.jjhrj.cn http://www.morning.tdqhs.cn.gov.cn.tdqhs.cn http://www.morning.lstmq.cn.gov.cn.lstmq.cn http://www.morning.hbqfh.cn.gov.cn.hbqfh.cn http://www.morning.xpqsk.cn.gov.cn.xpqsk.cn