Skip to content

Commit

Permalink
Veracode API version bumps
Browse files Browse the repository at this point in the history
  • Loading branch information
mort666 committed Oct 27, 2015
1 parent a9c1755 commit b6d6a6d
Show file tree
Hide file tree
Showing 18 changed files with 279,999 additions and 7,388 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ Gemfile.lock
pkg/*

.DS_Store

.env
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ group :test do
gem 'turn'
gem 'minitest'
gem 'rake'
gem 'pry'
gem 'plymouth'
end

# Specify your gem's dependencies in veracode.gemspec
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012 Stephen Kapp
Copyright (c) Stephen Kapp 2012-2015

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ Ruby Wrapper for the Veracode API
About
-----

This Gem puts a wrapper around the Veracode API to allow access to API functionality to view reports, perform uploads and administer accounts.
This Gem puts a wrapper around the Veracode API to allow access to API functionality to view reports, perform uploads and administer accounts.

This gem is not used as part of packaging for a Veracode scan of a Ruby on Rails application.

How to use it
-------------
Expand All @@ -33,4 +35,4 @@ Found an issue, please report it on Github

https://github.com/mort666/veracode-api

Copyright (c) 2012 Stephen Kapp, released under the Apache License, Version 2.0
Copyright (c) 2012-2015 Stephen Kapp, released under the Apache License, Version 2.0
34 changes: 17 additions & 17 deletions lib/veracode/results.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,38 @@
module Veracode
module API
class Results < Veracode::API::Base
GET_APP_BUILDS_URI = "/api/2.0/getappbuilds.do"
DETAILED_REPORT_URI = "/api/2.0/detailedreport.do"
DETAILED_REPORT_PDF_URI = "/api/2.0/detailedreportpdf.do"
GET_CALL_STACKS_URI = "/api/2.0/getcallstacks.do"
SUMMARY_REPORT_URI = "/api/2.0/summaryreport.do"
SUMMARY_REPORT_PDF_URI = "/api/2.0/summaryreportpdf.do"
THIRD_PARTY_REPORT_PDF_URI = "/api/2.0/thirdpartyreportpdf.do"
GET_APP_BUILDS_URI = "/api/4.0/getappbuilds.do"
DETAILED_REPORT_URI = "/api/3.0/detailedreport.do"
DETAILED_REPORT_PDF_URI = "/api/3.0/detailedreportpdf.do"
GET_CALL_STACKS_URI = "/api/3.0/getcallstacks.do"
SUMMARY_REPORT_URI = "/api/3.0/summaryreport.do"
SUMMARY_REPORT_PDF_URI = "/api/3.0/summaryreportpdf.do"
THIRD_PARTY_REPORT_PDF_URI = "/api/3.0/thirdpartyreportpdf.do"

def get_callstacks(build_id, flaw_id)
xml = getXML(GET_CALL_STACKS_URI + "?build_id=" + build_id + "&flaw_id=" + flaw_id)
case xml.code
when 200
clean_xml = xml.body.strip
parsed = Veracode::Parser.parse(clean_xml)
parsed = Veracode::Parser.parse(clean_xml)
builds = Veracode::Result::CallStacks.new(parsed)
else
xml.error!
end
end

def get_application_builds
xml = getXML(GET_APP_BUILDS_URI)
case xml.code
when 200
clean_xml = xml.body.strip
parsed = Veracode::Parser.parse(clean_xml)
parsed = Veracode::Parser.parse(clean_xml)
builds = Veracode::Result::Builds::Applications.new(parsed)
else
xml.error!
end
end

def get_summary_report(build_id)
xml = getXML(SUMMARY_REPORT_URI + "?build_id=" + build_id)
case xml.code
Expand All @@ -52,20 +52,20 @@ def get_summary_report(build_id)
xml.error!
end
end

def get_detailed_report(build_id)
xml = getXML(DETAILED_REPORT_URI + "?build_id=" + build_id)
case xml.code
when 200
when 200
xmlbody = xml.body
clean_xml = xmlbody.strip
parsed = Veracode::Parser.parse(clean_xml)
parsed = Veracode::Parser.parse(clean_xml)

report = Veracode::Result::DetailedReport.new(parsed.detailedreport)
else
xml.error!
end
end
end
end
end
end
end
2 changes: 1 addition & 1 deletion lib/veracode/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Veracode
module API
VERSION = "0.4.1"
VERSION = "0.5.0"
end
end
Loading

0 comments on commit b6d6a6d

Please sign in to comment.