Skip to content

Implement flake8-bandit #1646

Description

@charliermarsh

Activity

  1. charliermarsh commented on Jan 5, 2023

    @charliermarsh
    MemberAuthor

    \cc @edgarrmondragon - easier to track here than to keep incrementing the count in the README. I'll populate the checklist.

  2. added
    pluginImplementing a known but unsupported Ruff plugin
    on Jan 5, 2023
  3. edgarrmondragon commented on Jan 5, 2023

    @edgarrmondragon
    Contributor
  4. charliermarsh commented on Jan 5, 2023

    @charliermarsh
    MemberAuthor

    By the way: the scripts are pretty bad right now, but it might save you some time (and would love help improving):

    python scripts/add_check.py --name ConvertLoopToAll --code SIM111 --plugin flake8-simplify
    

    The main limitations right now are:

    1. Doesn't keep the members sorted in registry.rs, so has to be manually resorted (else checks appear out-of-order in the docs and elsewhere).
    2. Assumes you're using a single plugins.rs file, instead of individual files for each check or a checks.rs file or whatever else, so that also requires manual tweaks.
  5. edgarrmondragon commented on Jan 5, 2023

    @edgarrmondragon
    Contributor

    By the way: the scripts are pretty bad right now, but it might save you some time (and would love help improving):

    python scripts/add_check.py --name ConvertLoopToAll --code SIM111 --plugin flake8-simplify
    

    The main limitations right now are:

    1. Doesn't keep the members sorted in registry.rs, so has to be manually resorted (else checks appear out-of-order in the docs and elsewhere).
    2. Assumes you're using a single plugins.rs file, instead of individual files for each check or a checks.rs file or whatever else, so that also requires manual tweaks.

    Thanks, I'll take a look at those. They might be really helpful for bandit's blacklist tests.

  6. ahmedbilal commented on Jan 10, 2023

    @ahmedbilal

    Please implement the configurations for it as well e.g exclude_dirs.

    https://bandit.readthedocs.io/en/latest/config.html#bandit-settings

  7. charliermarsh commented on Jan 10, 2023

    @charliermarsh
    MemberAuthor

    @ahmedbilal - I think exclude_dirs can be accomplished with the per-file-ignores settings, like:

    [tool.ruff.per-file-ignores]
    "excluded_dir" = ["S"]
  8. colin99d commented on Jan 12, 2023

    @colin99d
    Contributor

    Not sure if this is the best place to ask, but do flake8-bandit and bandit have the same linters?

  9. colin99d commented on Jan 12, 2023

    @colin99d
    Contributor

    Also @charliermarsh do you think it would be helpful to pin all of the issues that are trackers for implementing a package to the top? It would make it easier for people to understand our progress, and to contribute to one.

  10. 71 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pluginImplementing a known but unsupported Ruff plugin

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions