## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 1;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

Name: bandit
Version: 1.8.0
Release: %autorelease
Summary: A framework for performing security analysis of Python source code

License: Apache-2.0
URL: https://github.com/PyCQA/bandit
Source: %{pypi_source}
BuildArch: noarch

BuildRequires:  python3-devel
BuildRequires:  pyproject-rpm-macros

# for checks, cherry-picked from test-requirements.txt (mixes coverage and linting)
BuildRequires:  python3dist(pytest)
BuildRequires:  python3dist(fixtures)
BuildRequires:  python3dist(gitpython)
BuildRequires:  python3dist(jschema-to-python)
BuildRequires:  python3dist(sarif-om)
BuildRequires:  python3dist(testscenarios)
BuildRequires:  python3dist(testtools)
BuildRequires:  python3dist(toml)

%description
Bandit provides a framework for performing security analysis of Python source
code, utilizing the ast module from the Python standard library.

The ast module is used to convert source code into a parsed tree of Python
syntax nodes. Bandit allows users to define custom tests that are performed
against those nodes. At the completion of testing, a report is generated
that lists security issues identified within the target source code.

%prep
%autosetup

# remove test that requires bs4
rm tests/unit/formatters/test_html.py

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files bandit

%check
%pytest tests

%files -f %{pyproject_files}
%doc AUTHORS ChangeLog README.rst
%doc doc
%doc examples
%license LICENSE
%{_bindir}/bandit
%{_bindir}/bandit-baseline
%{_bindir}/bandit-config-generator

%changelog
## START: Generated by rpmautospec
* Wed Nov 27 2024 Packit <hello@packit.dev> - 1.8.0-1
- Update to 1.8.0 upstream release
- Resolves: rhbz#2329084

* Wed Sep 25 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 1.7.10-1
- Update to 1.7.10 - Closes rhbz#2314287

* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Sat Jun 15 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 1.7.9-1
- Update to 1.7.9 - Closes rhbz#2292094

* Sun Jun 09 2024 Python Maint <python-maint@redhat.com> - 1.7.8-2
- Rebuilt for Python 3.13

* Fri Mar 08 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 1.7.8-1
- Update to 1.7.8 - Closes rhbz#2268622

* Thu Feb 08 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 1.7.7-1
- Update to 1.7.7 - Closes rhbz#2259945

* Tue Jan 23 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Sat Dec 09 2023 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 1.7.6-1
- Update to 1.7.6 - Closes rhbz#2253734

* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Thu Jun 29 2023 Python Maint <python-maint@redhat.com> - 1.7.5-3
- Rebuilt for Python 3.12

* Thu May 18 2023 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 1.7.5-2
- migrated to SPDX license

* Fri Mar 10 2023 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 1.7.5-1
- Update to 1.7.5 - Closes rhbz#2177107

* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Sat Oct 22 2022 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 1.7.4-4
- Add explicit dep on pbr - Closes rhbz#2136143

* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Wed Jun 15 2022 Python Maint <python-maint@redhat.com> - 1.7.4-2
- Rebuilt for Python 3.11

* Fri Mar 04 2022 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 1.7.4-1
- Update to 1.7.4 - Closes rhbz#2060745

* Mon Feb 28 2022 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 1.7.3-1
- Update to 1.7.3 - Closes rhbz#2059030

* Wed Jan 26 2022 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 1.7.2-1
- Update to 1.7.2 - Closes rhbz#2045931

* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Thu Dec 16 2021 Miro Hrončok <miro@hroncok.cz> - 1.7.1-3
- Fix BuildRequires for tests
- There is no [test] extra.
- We cannot use test-requirements.txt directly, as it includes coverage and
  linting
- Explicitly add toml and testscenarios which were only brought in
  transitively (pytest 7 no longer brings in toml)

* Fri Nov 12 2021 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 1.7.1-2
- Add missing deps

* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.7.0-3
- Rebuilt for Python 3.10

* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Sun Dec 13 2020 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 1.7.0-1
- Update to 1.7.0 (#1907119)

* Sun Dec 06 2020 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 1.6.3-1
- Version bump

* Tue Oct 06 2020 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 1.6.2-1
- Version bump

* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.4.0-13
- Rebuilt for Python 3.9

* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.4.0-11
- Rebuilt for Python 3.8.0rc1 (#1748018)

* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.4.0-10
- Rebuilt for Python 3.8

* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.4.0-6
- Rebuilt for Python 3.7

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Mon Nov 27 2017 Marek Cermak <macermak@redhat.com> - 1.4.0-4
- new formatter (custom)

* Mon Nov 27 2017 Marek Cermak <macermak@redhat.com> - 1.4.0-3
- new formatter (yaml)

* Mon Nov 27 2017 Marek Cermak <macermak@redhat.com> - 1.4.0-2
- reformat setup.cfg

* Tue Sep 19 2017 Marek Cermak <macermak@redhat.com> - 1.4.0-1
- new version 1.4.0

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.0.1-3
- Rebuild for Python 3.6

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages


* Thu Apr 21 2016 Michael Scherer <misc@zarb.org> - 1.0.1-1
- update to 1.0.1
- port to python3
- drop the /etc configuration directory, as upstream did remove config file

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Aug 20 2015 Michael Scherer <misc@zarb.org> 0.13.2-1
- new version 0.13.2
- add requires on python-stevedore, fix #1254589

* Sat Jul 11 2015 Michael Scherer <misc@zarb.org> 0.12.0-1
- new version 0.12.0

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Wed Jun 10 2015 Michael Scherer <misc@zarb.org> 0.11.0-1
- new version 0.11.0

* Fri May 01 2015 Michael Scherer <misc@zarb.org> 0.10.1-1
- Initial package

## END: Generated by rpmautospec