pysast


Namepysast JSON
Version 1.1.2a0 PyPI version JSON
download
home_page
SummarySAST Code Scanner in Python
upload_time2023-05-21 07:03:55
maintainer
docs_urlNone
authorMatrixEditor
requires_python>=3.8,<4.0
licenseGNU GPLv3
keywords pysast
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PySAST

[![python](https://img.shields.io/badge/python-3.8+-blue.svg?logo=python&labelColor=lightgrey)](https://www.python.org/downloads/)
![Status](https://img.shields.io:/static/v1?label=Status&message=Alpha-Release&color=lightgreen)
![Platform](https://img.shields.io:/static/v1?label=Platforms&message=All&color=yellowgreen)
![PyPi](https://img.shields.io:/static/v1?label=PyPi&message=1.1.2-alpha&color=lightblue)
![Codestyle](https://img.shields.io:/static/v1?label=Codestyle&message=black&color=black)

Welcome to `pysast` - a powerful Python package designed for scanning one or multiple files using customizable rules written
in JSON or YAML. This package allows you to automate the process of code analysis and identify potential issues or violations
based on your specified criteria.

By utilizing the rule-based system, you can define a set of rules that reflect your desired coding standards, best practices,
or specific requirements. The package then scans your files, identifies instances that violate the defined rules, and reports
them to help you maintain a high code quality.

You can install pysast using pip, the Python package installer. Simply run the following command:

## Installation

```shell
pip install pysast
```

Once installed, you're ready to start using pysast for your code analysis needs.

## Documentation

For more detailed information on using pysast, please refer to the [official documentation](https://matrixeditor.github.io/pysast/) on Github.

## Getting Started

Before you begin using `pysast`, it's recommended to familiarize yourself with the package's functionality and usage. The following steps will guide you through the essential setup and running your first code scan:

1. [Rule Definition](https://matrixeditor.github.io/pysast/intro/sast_rules.html): Learn how to define rules in JSON or YAML format to specify the analysis criteria for your codebase.
2. [Running Scans](https://matrixeditor.github.io/pysast/intro/sast_scans.html): Explore how to execute pysast to scan your files and generate detailed reports.
3. [Advanced Usage](https://matrixeditor.github.io/pysast/api/index.html): Dive deeper into the advanced features and options offered by pysast to enhance your code analysis capabilities.

By following these steps, you'll be equipped with the knowledge and tools to effectively utilize `pysast` in your projects.

## Optimization

Since version ``1.1.0`` this program introduces an optimization feature that significantly
improves its performance by leveraging threading. By utilizing the ``--threading`` option
on the command line, you can enable this optimization to take full advantage of your
system's resources.

## CLI Options

    usage: pysast.py [-h] [-r] [-j] [-v] [-s SAST_RULES] [-S SAST_DIRS] [-rS RECURSIVE_SAST_DIRS] [--disable-prefilter] [--enable-postfilter] [-M MAX_BYTES] [-T] [-e EXCLUDE_FILES] [--threading] [PATHS ...]

    Scan the given file with SAST scanner using all available rules.

    positional arguments:
    PATHS                 One or more files or directories to scan.

    options:
    -h, --help            show this help message and exit
    -r, --recursive       Scan target directories recursively
    -j, --json            Dump JSON output instead of pprint.
    -v, --verbose         Specifies the verbosity for the next scan. Use -vvv for more verbose output.
    -s SAST_RULES, --sast-rule SAST_RULES
                            File path(s) to SAST rules to import. (Use -S for directories)
    -S SAST_DIRS, --sast-dir SAST_DIRS
                            One or more directories that store SAST rules. (Use -rS for recursive search) The current directory is used if no rules are specified.
    -rS RECURSIVE_SAST_DIRS, --recursive-sast-dir RECURSIVE_SAST_DIRS
                            Load rules from target directories recursively
    --disable-prefilter   Disable prefiltering rules.
    --enable-postfilter   Enable postfiltering.
    -M MAX_BYTES, --max-bytes MAX_BYTES
                            Skip files exteeding a the amount of maximum bytes.
    -T, --disable-mime, -T, --disable-mime
                            Specifies whether the scanner should use the 'file' utility to retrieve the MIME-type of a file. (enabled as per default)
    -e EXCLUDE_FILES, --exclude-file EXCLUDE_FILES
                            Specifies exclusion files (use re: for regular expressions)
    --threading           Activates threading for file processing. (Can't be used on daemon processes)

## Contributing

We welcome contributions from the community! If you'd like to contribute to `pysast`, please refer to the contribution guidelines.

## Support

If you encounter any issues or have any questions or suggestions, please feel free to open an issue.

## License

This project is licensed under the GNU GPLv3.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pysast",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "pysast",
    "author": "MatrixEditor",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/b9/eb/c5e9ce4ef7a551ecaa623eb0133070a83da7174b93ae65e727da8d31d7fb/pysast-1.1.2a0.tar.gz",
    "platform": null,
    "description": "# PySAST\n\n[![python](https://img.shields.io/badge/python-3.8+-blue.svg?logo=python&labelColor=lightgrey)](https://www.python.org/downloads/)\n![Status](https://img.shields.io:/static/v1?label=Status&message=Alpha-Release&color=lightgreen)\n![Platform](https://img.shields.io:/static/v1?label=Platforms&message=All&color=yellowgreen)\n![PyPi](https://img.shields.io:/static/v1?label=PyPi&message=1.1.2-alpha&color=lightblue)\n![Codestyle](https://img.shields.io:/static/v1?label=Codestyle&message=black&color=black)\n\nWelcome to `pysast` - a powerful Python package designed for scanning one or multiple files using customizable rules written\nin JSON or YAML. This package allows you to automate the process of code analysis and identify potential issues or violations\nbased on your specified criteria.\n\nBy utilizing the rule-based system, you can define a set of rules that reflect your desired coding standards, best practices,\nor specific requirements. The package then scans your files, identifies instances that violate the defined rules, and reports\nthem to help you maintain a high code quality.\n\nYou can install pysast using pip, the Python package installer. Simply run the following command:\n\n## Installation\n\n```shell\npip install pysast\n```\n\nOnce installed, you're ready to start using pysast for your code analysis needs.\n\n## Documentation\n\nFor more detailed information on using pysast, please refer to the [official documentation](https://matrixeditor.github.io/pysast/) on Github.\n\n## Getting Started\n\nBefore you begin using `pysast`, it's recommended to familiarize yourself with the package's functionality and usage. The following steps will guide you through the essential setup and running your first code scan:\n\n1. [Rule Definition](https://matrixeditor.github.io/pysast/intro/sast_rules.html): Learn how to define rules in JSON or YAML format to specify the analysis criteria for your codebase.\n2. [Running Scans](https://matrixeditor.github.io/pysast/intro/sast_scans.html): Explore how to execute pysast to scan your files and generate detailed reports.\n3. [Advanced Usage](https://matrixeditor.github.io/pysast/api/index.html): Dive deeper into the advanced features and options offered by pysast to enhance your code analysis capabilities.\n\nBy following these steps, you'll be equipped with the knowledge and tools to effectively utilize `pysast` in your projects.\n\n## Optimization\n\nSince version ``1.1.0`` this program introduces an optimization feature that significantly\nimproves its performance by leveraging threading. By utilizing the ``--threading`` option\non the command line, you can enable this optimization to take full advantage of your\nsystem's resources.\n\n## CLI Options\n\n    usage: pysast.py [-h] [-r] [-j] [-v] [-s SAST_RULES] [-S SAST_DIRS] [-rS RECURSIVE_SAST_DIRS] [--disable-prefilter] [--enable-postfilter] [-M MAX_BYTES] [-T] [-e EXCLUDE_FILES] [--threading] [PATHS ...]\n\n    Scan the given file with SAST scanner using all available rules.\n\n    positional arguments:\n    PATHS                 One or more files or directories to scan.\n\n    options:\n    -h, --help            show this help message and exit\n    -r, --recursive       Scan target directories recursively\n    -j, --json            Dump JSON output instead of pprint.\n    -v, --verbose         Specifies the verbosity for the next scan. Use -vvv for more verbose output.\n    -s SAST_RULES, --sast-rule SAST_RULES\n                            File path(s) to SAST rules to import. (Use -S for directories)\n    -S SAST_DIRS, --sast-dir SAST_DIRS\n                            One or more directories that store SAST rules. (Use -rS for recursive search) The current directory is used if no rules are specified.\n    -rS RECURSIVE_SAST_DIRS, --recursive-sast-dir RECURSIVE_SAST_DIRS\n                            Load rules from target directories recursively\n    --disable-prefilter   Disable prefiltering rules.\n    --enable-postfilter   Enable postfiltering.\n    -M MAX_BYTES, --max-bytes MAX_BYTES\n                            Skip files exteeding a the amount of maximum bytes.\n    -T, --disable-mime, -T, --disable-mime\n                            Specifies whether the scanner should use the 'file' utility to retrieve the MIME-type of a file. (enabled as per default)\n    -e EXCLUDE_FILES, --exclude-file EXCLUDE_FILES\n                            Specifies exclusion files (use re: for regular expressions)\n    --threading           Activates threading for file processing. (Can't be used on daemon processes)\n\n## Contributing\n\nWe welcome contributions from the community! If you'd like to contribute to `pysast`, please refer to the contribution guidelines.\n\n## Support\n\nIf you encounter any issues or have any questions or suggestions, please feel free to open an issue.\n\n## License\n\nThis project is licensed under the GNU GPLv3.\n",
    "bugtrack_url": null,
    "license": "GNU GPLv3",
    "summary": "SAST Code Scanner in Python",
    "version": "1.1.2a0",
    "project_urls": null,
    "split_keywords": [
        "pysast"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4dcdcee62c0a6cfc588f05af8ed45321fad23d658df774371da161b8586e2ca5",
                "md5": "1919f7f5f5e36c752491ac0958831d41",
                "sha256": "b316eecde6e517dc535013606431c4942218efde507591bfb53773ca1d8079e2"
            },
            "downloads": -1,
            "filename": "pysast-1.1.2a0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1919f7f5f5e36c752491ac0958831d41",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 26819,
            "upload_time": "2023-05-21T07:03:53",
            "upload_time_iso_8601": "2023-05-21T07:03:53.647344Z",
            "url": "https://files.pythonhosted.org/packages/4d/cd/cee62c0a6cfc588f05af8ed45321fad23d658df774371da161b8586e2ca5/pysast-1.1.2a0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b9ebc5e9ce4ef7a551ecaa623eb0133070a83da7174b93ae65e727da8d31d7fb",
                "md5": "68226b72d6d8f61a7155a1494cc06e49",
                "sha256": "d384186a5024e01628f65222ec19b27481d2efaa3cafef5eb63a5c7b0914edfb"
            },
            "downloads": -1,
            "filename": "pysast-1.1.2a0.tar.gz",
            "has_sig": false,
            "md5_digest": "68226b72d6d8f61a7155a1494cc06e49",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 25903,
            "upload_time": "2023-05-21T07:03:55",
            "upload_time_iso_8601": "2023-05-21T07:03:55.381472Z",
            "url": "https://files.pythonhosted.org/packages/b9/eb/c5e9ce4ef7a551ecaa623eb0133070a83da7174b93ae65e727da8d31d7fb/pysast-1.1.2a0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-21 07:03:55",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pysast"
}
        
Elapsed time: 0.62049s