构建过程中的病毒扫描 [英] Virus scanning in build process

查看:89
本文介绍了构建过程中的病毒扫描的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将对病毒的扫描合并到Java/Maven/Hudson构建过程中.不幸的是,我找不到用于此类构建步骤的专用工具的任何资源.我的构建环境是基于Linux的.

I would like to incorporate scanning for viruses into a Java/Maven/Hudson build process. Unfortunately, i could not find any resources on dedicated tools for this kind of build step. My build environment is Linux-based.

我的问题是: 如何将防病毒扫描合并到基于Maven和Hudson的构建过程中?

最佳做法是什么?

  • 扫描步骤是否应与常规构建分开,例如一个预构建步骤,甚至是一个单独的构建作业?
  • 在将所有文物都打包到jar文件中之后还是在此过程的早期,扫描应该在包装的后期进行吗?
  • 每个已发布的伪像都应包括一个扫描程序日志文件,该文件确定正在使用的防病毒工具,病毒定义文件的版本和日期吗?

使用哪种防病毒软件不在此问题的范围内. (例如,我想使用商业供应商来支持ClamAV等免费工具)

Which anti-virus software to use is out of scope of this question. (E.g. i'd like to use a commercial vendor in favor of free tools like ClamAV)

推荐答案

病毒从哪里来?

我还没有看到可以修改源代码的病毒,因此该源可能是安全的(好吧,除非您不信任开发人员).

I've yet to see a virus which can modify source code, so the source is probably safe (well, unless you can't trust your developers).

因此,该病毒可以隐藏在其中一个构建工具中,并尝试修改JAR.这里的工具是 tripwire :它将为所有文件创建校验和,并且构建工具应更改(除非您安装新版本,否则必须再次运行tripwire).

So the virus can hide in one of the build tools and try to modify the JAR. The tool at hand here is tripwire: It will create checksums for all the files and the build tools should not change (unless you install a new version; then you have to run tripwire again).

如果构建工具安全,则只需要保护操作系统的AV工具(因此打开和写入文件之类的功能是安全的).为此,请使用贵公司的标准AV.

If the build tools are safe, you just need a AV tool which protects the OS (so functions like opening and writing files are safe). Use the standard AV of your company for this.

要使整个过程更加紧密,可以在构建新版本之前再次构建上一个版本.旧版本的校验和不应更改(不过请注意文件中的时间戳).

To make the whole process really tight, you can build the last release again before you build the new release. The checksums of the old release shouldn't change (beware of timestamps in the files, though).

这篇关于构建过程中的病毒扫描的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆