Skip to main content

report-generation-service

Project description

Greenbone Logo

Pheme - Greenbone Static Report Generator

GitHub releases PyPI release code test coverage Build and test

pheme is a service to create scan reports. It is maintained by Greenbone AG.

Pheme is the personification of fame and renown.

Or in this case personification of a service to generate reports.

Table of Contents

Installation

Requirements

Python 3.8 and later is supported.

Besides python pheme also needs to have

  • libcairo2-dev
  • pango1.0

installed.

Development

pheme uses poetry for its own dependency management and build process.

First install poetry via pip

python3 -m pip install --user poetry

Afterwards run

poetry install

in the checkout directory of pheme (the directory containing the pyproject.toml file) to install all dependencies including the packages only required for development.

Afterwards activate the git hooks for auto-formatting and linting via autohooks.

poetry run autohooks activate

Validate the activated git hooks by running

poetry run autohooks check

Usage

In order to prepare the data structure the XML report data needs to be posted to pheme with a grouping indicator (either by host or nvt).

E.g.:

> curl -X POST 'http://localhost:8000/transform?grouping=nvt'\
    -H 'Content-Type: application/xml'\
    -H 'Accept: application/json'\
    -d @test_data/longer_report.xml

  "scanreport-nvt-9a233b0d-713c-4f22-9e15-f6e5090873e3"⏎

The returned identifier can be used to generate the actual report.

So far a report can be either in:

  • application/json
  • application/xml
  • text/csv E.g.
> curl -v 'http://localhost:8000/report/scanreport-nvt-9a233b0d-713c-4f22-9e15-f6e5090873e3' -H 'Accept: application/csv'

For visual report like

  • application/pdf
  • text/html

the corresponding css and html template needs to be put into pheme first:

> curl -X PUT localhost:8000/parameter\
    -H 'x-api-key: SECRET_KEY_missing_using_default_not_suitable_in_production'\
    --form vulnerability_report_html_css=@path_to_css_template\
    --form vulnerability_report_pdf_css=@path_to_css_template\
    --form vulnerability_report=@path_to_html_template

afterwards it can be get as usual:

> curl -v 'http://localhost:8000/report/scanreport-nvt-9a233b0d-713c-4f22-9e15-f6e5090873e3' -H 'Accept: application/pdf'

Maintainer

This project is maintained by Greenbone AG

Contributing

Your contributions are highly appreciated. Please create a pull request on GitHub. Bigger changes need to be discussed with the development team via the issues section at GitHub first.

License

Copyright (C) 2020-2023 Greenbone AG

Licensed under the GNU Affero General Public License v3.0 or later.

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

pheme-21.10.2.tar.gz (36.6 kB view details)

Uploaded Source

Built Distribution

pheme-21.10.2-py3-none-any.whl (54.6 kB view details)

Uploaded Python 3

File details

Details for the file pheme-21.10.2.tar.gz.

File metadata

  • Download URL: pheme-21.10.2.tar.gz
  • Upload date:
  • Size: 36.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.8

File hashes

Hashes for pheme-21.10.2.tar.gz
Algorithm Hash digest
SHA256 b3fe710f85bcc800aecc84f77a1f68d9e59ed1764c338e8218d5a61df018aeb0
MD5 1d6e02a0bc9922506daf31fb22eee584
BLAKE2b-256 3455ee8e5841884b5ba015e80b556345a560612f5ea55ab6fa35493118eedffc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pheme-21.10.2.tar.gz:

Publisher: deploy-pypi.yml on greenbone/pheme

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pheme-21.10.2-py3-none-any.whl.

File metadata

  • Download URL: pheme-21.10.2-py3-none-any.whl
  • Upload date:
  • Size: 54.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.8

File hashes

Hashes for pheme-21.10.2-py3-none-any.whl
Algorithm Hash digest
SHA256 44bb64e3c69cc22f7359d98fc4b384e85b873ec0b90db99398c4bd9e1a26ede8
MD5 b31aca8f8c3522b26746026f50be1511
BLAKE2b-256 bb80804ca6f0fc5916228deb20321ccf15e6f1ce03e537a1f1990d2f0ac47810

See more details on using hashes here.

Provenance

The following attestation bundles were made for pheme-21.10.2-py3-none-any.whl:

Publisher: deploy-pypi.yml on greenbone/pheme

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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