fortifyapi


Namefortifyapi JSON
Version 3.1.19 PyPI version JSON
download
home_pagehttps://github.com/fortifyadmin/fortifyapi
SummaryPython library for Fortify Software Security Center (SSC) RESTFul API
upload_time2024-11-15 22:42:38
maintainerNone
docs_urlNone
authorBrandon Spruth, Matthew Gill
requires_pythonNone
licenseMIT
keywords fortify api security software microfocus ssc sast
VCS
bugtrack_url
requirements requests requests-toolbelt
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. image:: https://img.shields.io/pypi/v/fortifyapi.svg
.. image:: https://img.shields.io/pypi/pyversions/fortifyapi.svg
.. image:: 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 <https://www.microfocus.com/en-us/products/software-security-assurance-sdlc/overview/>`_

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 <https://pypi.org/project/fortifyapi/>`__.

Example
~~~~~~~

.. code:: python

   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
~~~~~~~~~~~~~~~~~~~~~
.. image:: https://img.shields.io/github/license/fortifyadmin/fortifyapi.svg?style=flat-square


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fortifyadmin/fortifyapi",
    "name": "fortifyapi",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "fortify, api, security, software, microfocus, ssc, sast",
    "author": "Brandon Spruth, Matthew Gill",
    "author_email": "brandon@spruth.co, mgill@c0ffee.me",
    "download_url": "https://files.pythonhosted.org/packages/47/b3/b5a7f8e2a5cd78eb294f44060a57c7cc21b952c7601118ef4e64b308218d/fortifyapi-3.1.19.tar.gz",
    "platform": null,
    "description": ".. image:: https://img.shields.io/pypi/v/fortifyapi.svg\n.. image:: https://img.shields.io/pypi/pyversions/fortifyapi.svg\n.. image:: https://img.shields.io/circleci/build/github/fortifyadmin/fortifyapi/master?logo=CircleCI\n\nFortify API\n***********\n\nFortify API is a Python RESTFul API client module for Fortify's `Software Security Center <https://www.microfocus.com/en-us/products/software-security-assurance-sdlc/overview/>`_\n\nQuick Start\n~~~~~~~~~~~\n\nSeveral quick start options are available:\n\n- Build locally: ``pip install wheel setuptools && python setup.py build`` \n- Install with pip (recommended): ``pip install fortifyapi``\n- `Download the latest release <https://pypi.org/project/fortifyapi/>`__.\n\nExample\n~~~~~~~\n\n.. code:: python\n\n   from os import environ\n   from locale import LC_ALL, setlocale\n   from fortifyapi.fortify import FortifyApi\n    \n   # Set encoding\n   environ[\"PYTHONIOENCODING\"] = \"utf-8\"\n   myLocale = setlocale(category=LC_ALL, locale=\"en_GB.UTF-8\")\n    \n   # Set vars for connection\n   url = 'https://some-fortify-host/ssc'\n   user = 'Fortify SSC User'\n   password = 'Fortify SSC Password'\n   description = 'fortifyapi test client'\n    \n   # Authenticate and retrieve token\n   def token():\n       api = FortifyApi(host=url, username=user, password=password, verify_ssl=False)\n       response = api.get_token(description=description)\n       return response.data['data']['token']\n    \n   # Re-use token in all requests\n   def api():\n       api = FortifyApi(host=url, token=token(), verify_ssl=False)\n       return api\n    \n   # List ID, Project/application Version\n   def list():\n       response = api().get_all_project_versions()\n       data = response.data['data']\n       for version in data:\n           print(\"{0:8} {1:30} {2:30}\".format(version['id'], version['project']['name'], version['name']).encode(\n               'utf-8', errors='ignore').decode())\n    \n   if __name__ == '__main__':\n        list()\n\nBugs and Feature Requests\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nFound something that doesn't seem right or have a feature request? Please open a new issue.\n\nCopyright and License\n~~~~~~~~~~~~~~~~~~~~~\n.. image:: https://img.shields.io/github/license/fortifyadmin/fortifyapi.svg?style=flat-square\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python library for Fortify Software Security Center (SSC) RESTFul API",
    "version": "3.1.19",
    "project_urls": {
        "Download": "https://github.com/fortifyadmin/fortifyapi/tarball/3.1.19",
        "Homepage": "https://github.com/fortifyadmin/fortifyapi"
    },
    "split_keywords": [
        "fortify",
        " api",
        " security",
        " software",
        " microfocus",
        " ssc",
        " sast"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fa797ae1d293000a6078b40237e260dd519bbb3a61c867258788e5ed4f72ec63",
                "md5": "bbbd134a593dcd2eb32b0689e0fa99a9",
                "sha256": "6901f5e358cd375015f3337f936c7c028a6f5370a610f7163d6c0f91af33b0ec"
            },
            "downloads": -1,
            "filename": "fortifyapi-3.1.19-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bbbd134a593dcd2eb32b0689e0fa99a9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 23467,
            "upload_time": "2024-11-15T22:42:36",
            "upload_time_iso_8601": "2024-11-15T22:42:36.414847Z",
            "url": "https://files.pythonhosted.org/packages/fa/79/7ae1d293000a6078b40237e260dd519bbb3a61c867258788e5ed4f72ec63/fortifyapi-3.1.19-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "47b3b5a7f8e2a5cd78eb294f44060a57c7cc21b952c7601118ef4e64b308218d",
                "md5": "b35fcef51234c58dd7374a470099d680",
                "sha256": "c26880321d06bbe875fc764e8edb64582040877464035ae7dd46a2ee54d21979"
            },
            "downloads": -1,
            "filename": "fortifyapi-3.1.19.tar.gz",
            "has_sig": false,
            "md5_digest": "b35fcef51234c58dd7374a470099d680",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 29671,
            "upload_time": "2024-11-15T22:42:38",
            "upload_time_iso_8601": "2024-11-15T22:42:38.051397Z",
            "url": "https://files.pythonhosted.org/packages/47/b3/b5a7f8e2a5cd78eb294f44060a57c7cc21b952c7601118ef4e64b308218d/fortifyapi-3.1.19.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-15 22:42:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fortifyadmin",
    "github_project": "fortifyapi",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "circle": true,
    "requirements": [
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "requests-toolbelt",
            "specs": []
        }
    ],
    "lcname": "fortifyapi"
}
        
Elapsed time: 0.90961s