{"id":14263201,"url":"https://github.com/securesauce/precli","last_synced_at":"2025-04-09T07:56:14.093Z","repository":{"id":219390977,"uuid":"616670926","full_name":"securesauce/precli","owner":"securesauce","description":"Precaution CLI - command line static application security testing tool","archived":false,"fork":false,"pushed_at":"2025-03-20T03:13:28.000Z","size":2564,"stargazers_count":23,"open_issues_count":44,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T09:14:51.242Z","etag":null,"topics":["command-line","go","java","python","sast","security","security-tools","static-analysis","static-code-analysis"],"latest_commit_sha":null,"homepage":"https://precli.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/securesauce.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-20T21:04:57.000Z","updated_at":"2025-03-20T03:13:27.000Z","dependencies_parsed_at":"2025-03-31T03:25:48.027Z","dependency_job_id":"6583d6ec-6cd1-41da-ba65-159d12681621","html_url":"https://github.com/securesauce/precli","commit_stats":null,"previous_names":["securesauce/precli"],"tags_count":71,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/securesauce%2Fprecli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/securesauce%2Fprecli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/securesauce%2Fprecli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/securesauce%2Fprecli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/securesauce","download_url":"https://codeload.github.com/securesauce/precli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247999852,"owners_count":21031044,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line","go","java","python","sast","security","security-tools","static-analysis","static-code-analysis"],"created_at":"2024-08-22T13:03:09.404Z","updated_at":"2025-04-09T07:56:14.073Z","avatar_url":"https://github.com/securesauce.png","language":"Python","readme":".. image:: https://raw.githubusercontent.com/securesauce/precli/main/images/logo.png\n    :alt: Precaution CLI\n\n.. image:: https://github.com/securesauce/precli/actions/workflows/unit-test.yml/badge.svg?branch=main\n    :target: https://github.com/securesauce/precli/actions/workflows/unit-test.yml\n    :alt: Build and Test\n\n.. image:: https://img.shields.io/pypi/v/precli.svg\n    :target: https://pypi.org/project/precli/\n    :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/pyversions/precli.svg\n    :target: https://pypi.org/project/precli/\n    :alt: Python Versions\n\n.. image:: https://img.shields.io/pypi/dm/precli\n    :target: https://pypistats.org/packages/precli\n    :alt: PyPI - Downloads\n\n======\n\nPrecli is the core of the `Precaution App \u003chttps://github.com/marketplace/precaution\u003e`_ and `Precaution Action \u003chttps://github.com/marketplace/actions/precaution-action\u003e`_. It also serves as a command line interface to demonstate its functionality. It is designed to do static code analysis of source code with a number of rules covering the standard library for the corresponding programming language.\n\nIf your needs go beyond the analysis of just the standard library, consider upgrading to Precaution Professional to get access to finding and fixing security vulnerabilities in third-party libraries. See https://www.securesauce.dev/ for more details.\n\nQuick Start\n-----------\n\nTo install:\n\n.. code-block:: console\n\n    pip install precli\n\nRun precli on a single test example:\n\n.. code-block:: console\n\n    precli tests/unit/rules/python/stdlib/hmac/examples/hmac_timing_attack.py\n\nExample code:\n\n.. code-block:: python\n\n    # level: ERROR\n    # start_line: 18\n    # end_line: 18\n    # start_column: 13\n    # end_column: 15\n    import hmac\n\n\n    received_digest = (\n        b\"\\xe2\\x93\\x08\\x19T8\\xdc\\x80\\xef\\x87\\x90m\\x1f\\x9d\\xf7\\xf2\"\n        b\"\\xf5\\x10\u003e\\xdbf\\xa2\\xaf\\xf7x\\xcdX\\xdf\"\n    )\n\n    key = b\"my-super-duper-secret-key-string\"\n    password = b\"pass\"\n    digest = hmac.digest(key, password, digest=\"sha224\")\n\n    print(digest == received_digest)\n\nExample result:\n\n.. image:: https://raw.githubusercontent.com/securesauce/precli/main/images/example.gif\n    :alt: Example output\n","funding_links":[],"categories":["static-analysis"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecuresauce%2Fprecli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecuresauce%2Fprecli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecuresauce%2Fprecli/lists"}