Skip to main content

Python library for Fortify Software Security Center (SSC) RESTFul API

Project description

https://img.shields.io/pypi/v/fortifyapi.svg https://img.shields.io/pypi/pyversions/fortifyapi.svg https://img.shields.io/circleci/build/github/fortifyadmin/fortifyapi/master?logo=CircleCI

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

  • Download the latest release.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fortifyapi-3.1.19.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

fortifyapi-3.1.19-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file fortifyapi-3.1.19.tar.gz.

File metadata

  • Download URL: fortifyapi-3.1.19.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.20

File hashes

Hashes for fortifyapi-3.1.19.tar.gz
Algorithm Hash digest
SHA256 c26880321d06bbe875fc764e8edb64582040877464035ae7dd46a2ee54d21979
MD5 b35fcef51234c58dd7374a470099d680
BLAKE2b-256 47b3b5a7f8e2a5cd78eb294f44060a57c7cc21b952c7601118ef4e64b308218d

See more details on using hashes here.

File details

Details for the file fortifyapi-3.1.19-py3-none-any.whl.

File metadata

  • Download URL: fortifyapi-3.1.19-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.20

File hashes

Hashes for fortifyapi-3.1.19-py3-none-any.whl
Algorithm Hash digest
SHA256 6901f5e358cd375015f3337f936c7c028a6f5370a610f7163d6c0f91af33b0ec
MD5 bbbd134a593dcd2eb32b0689e0fa99a9
BLAKE2b-256 fa797ae1d293000a6078b40237e260dd519bbb3a61c867258788e5ed4f72ec63

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page