Python library for Fortify Software Security Center (SSC) RESTFul API
Project description
Fortify API
Fortify API is a Python RESTFul API client module for Fortify’s Software Security Center
Quick Start
Several quick start options are available:
Build locally: pip install wheel setuptools && python setup.py build
Install with pip (recommended): pip install fortifyapi
Example
from os import environ
from locale import LC_ALL, setlocale
from fortifyapi.fortify import FortifyApi
# Set encoding
environ["PYTHONIOENCODING"] = "utf-8"
myLocale = setlocale(category=LC_ALL, locale="en_GB.UTF-8")
# Set vars for connection
url = 'https://some-fortify-host/ssc'
user = 'Fortify SSC User'
password = 'Fortify SSC Password'
description = 'fortifyapi test client'
# Authenticate and retrieve token
def token():
api = FortifyApi(host=url, username=user, password=password, verify_ssl=False)
response = api.get_token(description=description)
return response.data['data']['token']
# Re-use token in all requests
def api():
api = FortifyApi(host=url, token=token(), verify_ssl=False)
return api
# List ID, Project/application Version
def list():
response = api().get_all_project_versions()
data = response.data['data']
for version in data:
print("{0:8} {1:30} {2:30}".format(version['id'], version['project']['name'], version['name']).encode(
'utf-8', errors='ignore').decode())
if __name__ == '__main__':
list()
Bugs and Feature Requests
Found something that doesn’t seem right or have a feature request? Please open a new issue.
Copyright and License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for fortifyapi-3.0.12.macosx-10.14-arm64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 064fc5004704f81fd5267d8e20978ef666f3df48a4b57177996788ec8785a99c |
|
MD5 | 0def50f334b38043b2cd91cf1780f559 |
|
BLAKE2b-256 | 21bece3f200e06b962d2d05eba9067b6d0c1e0eb6b5da88b1bc220d73d9a44d2 |
Close
Hashes for fortifyapi-3.0.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7281d14bb03ab62fd02fc1aa78e369b709f4b2d6da6ba27b22a851d65d6f4ad2 |
|
MD5 | 255de0e6435abf1a80a543b8a43e8d62 |
|
BLAKE2b-256 | 76655b2b61433362d289d10296c640c221f84ac67e855e79ccffd258ad77e49b |