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
Release files for fortifyapi 3.1.27
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fortifyapi-3.1.27.tar.gz | 31.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fortifyapi-3.1.27-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.6 kB
Release files / fortifyapi-3.1.27.tar.gz
| Download URL | fortifyapi-3.1.27.tar.gz |
|---|---|
| Size | 31.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1119fdb348ba12911ea04165419b53314dde9529674db831347448628b0bdd09
|
|
BLAKE2b-256 checksum How to use checksums |
193da50562ec053c314749b50f4e571835b1ec81e1d7cd9fba3d1ec3f68f1f64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.20
|
Release files / fortifyapi-3.1.27-py3-none-any.whl
| Download URL | fortifyapi-3.1.27-py3-none-any.whl |
|---|---|
| Size | 24.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f312a1b2ca2d85dfaa4a141c6e33a37aa0408597b8e84217fbc8bdcc4cf1eee7
|
|
BLAKE2b-256 checksum How to use checksums |
f52c2a8369a7b73d35e7f6ae5d80c5af3a557149d8b5f46ba09f46a3f5d859f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.20
|