presidentbeef/brakeman — pull request #463 by gregose (2014-04-02 19:43:50+00:00)
Title: GitHub flavored markdown output

This adds GFM output format for reports (closes https://github.com/presidentbeef/brakeman/issues/435). This can be triggered with `-f markdown` or `-o file.md` flags or programmatically with `Brakeman::Report#to_markdown`.

Additionally, the `github-repo` flag / option has been added.
```
--github-repo USER/REPO[/PATH][@REF]
Output links to GitHub in markdown and HTML reports using specified repo
```

This allows a user to set the app's GitHub repository (user/repo) and optionally, application path within the repo and git ref (sha, tag, branch). This is used to generate links within the GFM and HTML reports to the file and line on GitHub for each warning with file info.

As an example, `brakeman -o test.md test/apps/rails3 --github-repo github/brakeman/test/apps/rails3` yields the report at https://gist.github.com/gregose/e7f1cc43263054bccd6d.

https://github.com/github/brakeman/commit/e2d3781ad58d2c1f81d45498ae3e012b7bd6e620 also closes a potential existing XSS in the HTML report by escaping the filename.

/cc @mastahyeti