fortify

HP Fortify Validation Rules on Path Manipulation

☆樱花仙子☆ 提交于 2019-12-07 15:54:04
问题 I am running code through Hp Fortify and have some path manipulation findings. I understand the context of it and trying to resolve. Instead of going through all the places where SOME path values are queried from a database to store output files (logs, export data, whatever), I tried to centralize it. So, instead of having File.WriteAllText() with some path + file name, content, I wanted to wrap into FortifyFileWriteAllText(). Then, in this function I do path validation check once up front,

Running Fortify scan over multiple maven projects

风格不统一 提交于 2019-12-07 05:51:09
问题 I have multiple projects bound by a single parent pom. If i run fortify scan on parent pom using Maven fortify plugin, fpr files for each project is generated. I would like to have a single fpr file being generated for all the projects. Is it possible ? Thanks and Regards, Saurav 回答1: What you want to do is an aggregate build. Try setting the same build ID for each module and then pass the -Dfortify.sca.toplevel.artifactId as the artifactID of the parent POM. This should give you a single FPR

How to fix “Path Manipulation Vulnerability” in some Java Code?

别等时光非礼了梦想. 提交于 2019-12-07 01:27:46
问题 The below simple java code getting Fortify Path Manipulation error. Please help me to resolve this. I am struggling from long time. public class Test { public static void main(String[] args) { File file=new File(args[0]); } } 回答1: Looking at the OWASP page for Path Manipulation, it says An attacker can specify a path used in an operation on the filesystem You are opening a file as defined by a user-given input. Your code is almost a perfect example of the vulnerability! Either Don't use the

Is Fortify-code scan possible with Scala

与世无争的帅哥 提交于 2019-12-06 08:53:19
Can I use Fortify to scan scala-code or the generated java (jar) files ? I know that I can do the jar option technically but are there any known challenges with respect to the generated java code? Fortify SCA now officially supports Scala (since December 2017). Adding this support was a collaborative project between Lightbend and Micro Focus. I did most of the engineering work on the Lightbend side, writing a compiler plugin that translates Scala code to an intermediate form that Fortify understands. Micro Focus added Scala-specific security rules and made any necessary adjustments to the

Interpreting Fortify results file (.fpr) through command line

别来无恙 提交于 2019-12-06 06:45:41
问题 As part of automating the process of running secure code analysis, I have a Jenkins job which uses the sourceanalyzer command line tool to generate an .fpr results file. At the moment I'm opening this results file in Audit Workbench application to view the results and check if there's any newly introduced issues etc, and generating a report from there in PDF/XML format. Does anyone is it possible to invoke Audit Workbench through the command line and generate a report on the issues, which we

Fortify, how to start analysis through command

浪子不回头ぞ 提交于 2019-12-06 01:27:38
问题 How we can generate FortiFy report using command ??? on linux. In command, how we can include only some folders or files for analyzing and how we can give the location to store the report. etc. Please help.... Thanks, Karthik 回答1: 1. Step#1 (clean cache) you need to plan scan structure before starting: scanid = 9999 (can be anything you like) ProjectRoot = /local/proj/9999/ WorkingDirectory = /local/proj/9999/working (this dir is huge, you need to "rm -rf ./working && mkdir ./working" before

HP Fortify Validation Rules on Path Manipulation

一曲冷凌霜 提交于 2019-12-06 01:15:26
I am running code through Hp Fortify and have some path manipulation findings. I understand the context of it and trying to resolve. Instead of going through all the places where SOME path values are queried from a database to store output files (logs, export data, whatever), I tried to centralize it. So, instead of having File.WriteAllText() with some path + file name, content, I wanted to wrap into FortifyFileWriteAllText(). Then, in this function I do path validation check once up front, and if valid, only then allow the write to continue such as... public static bool

Running Fortify scan over multiple maven projects

旧时模样 提交于 2019-12-05 10:50:50
I have multiple projects bound by a single parent pom. If i run fortify scan on parent pom using Maven fortify plugin, fpr files for each project is generated. I would like to have a single fpr file being generated for all the projects. Is it possible ? Thanks and Regards, Saurav What you want to do is an aggregate build. Try setting the same build ID for each module and then pass the -Dfortify.sca.toplevel.artifactId as the artifactID of the parent POM. This should give you a single FPR file. It should look like: mvn clean mvn -Dfortify.sca.buildId=ACMEPortal com.fortify.ps.maven.plugin:sca

Fortify Source Analyzer and Apache Lenya

被刻印的时光 ゝ 提交于 2019-12-04 10:24:27
I am trying to use Fortify Source Code Analyzer for a research project at my school to test the security for open source Java web applications. I am currently working on Apache Lenya. I am working with the last stable release (Lenya v2.0.2). Inside the root directory there is a file named build.sh . This file is called to build Lenya using the version of Ant that ships with the release (in the tools/bin folder). I can build Lenya just fine when I run ./build.sh . So, it would be assumed that running the following command in Fortify would work : sourceanalyzer -b lenya -Xmx1200M touchless .

Interpreting Fortify results file (.fpr) through command line

浪尽此生 提交于 2019-12-04 10:13:55
As part of automating the process of running secure code analysis, I have a Jenkins job which uses the sourceanalyzer command line tool to generate an .fpr results file. At the moment I'm opening this results file in Audit Workbench application to view the results and check if there's any newly introduced issues etc, and generating a report from there in PDF/XML format. Does anyone is it possible to invoke Audit Workbench through the command line and generate a report on the issues, which we could then leverage through a Jenkins script and also then mail the results? Looking online the command