This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sedona.git
The following commit(s) were added to refs/heads/master by this push:
new cb3bcc994a [CI] Clean up Python Bandit skips (#2178)
cb3bcc994a is described below
commit cb3bcc994a750778c381164df509c1d2c1edeb5a
Author: John Bampton <[email protected]>
AuthorDate: Wed Oct 22 13:57:20 2025 +1000
[CI] Clean up Python Bandit skips (#2178)
---
pyproject.toml | 3 ++-
python/sedona/spark/core/geom/shapely1/envelope.py | 2 +-
python/sedona/spark/core/geom/shapely2/envelope.py | 2 +-
python/sedona/spark/raster/sedona_raster.py | 2 +-
python/sedona/spark/stac/collection_client.py | 2 +-
5 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index eaa9dc7029..1cb03421d3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -16,7 +16,8 @@
# under the License.
[tool.bandit]
-skips = ["B101", "B403", "B405", "B608"]
+exclude_dirs = ["python/tests"]
+skips = ["B101"]
[tool.codespell]
ignore-words = '.github/linters/codespell.txt'
diff --git a/python/sedona/spark/core/geom/shapely1/envelope.py
b/python/sedona/spark/core/geom/shapely1/envelope.py
index 5d353e0fce..702754bfb3 100644
--- a/python/sedona/spark/core/geom/shapely1/envelope.py
+++ b/python/sedona/spark/core/geom/shapely1/envelope.py
@@ -16,7 +16,7 @@
# under the License.
import math
-import pickle
+import pickle # nosec B403
from sedona.spark.utils.decorators import require
from shapely.geometry import Point, Polygon
diff --git a/python/sedona/spark/core/geom/shapely2/envelope.py
b/python/sedona/spark/core/geom/shapely2/envelope.py
index 75c497920a..4f38f47aec 100644
--- a/python/sedona/spark/core/geom/shapely2/envelope.py
+++ b/python/sedona/spark/core/geom/shapely2/envelope.py
@@ -16,7 +16,7 @@
# under the License.
import math
-import pickle
+import pickle # nosec B403
from shapely.geometry import Polygon, box
from shapely.geometry.base import BaseGeometry
diff --git a/python/sedona/spark/raster/sedona_raster.py
b/python/sedona/spark/raster/sedona_raster.py
index b7c0020a88..84836e8a1c 100644
--- a/python/sedona/spark/raster/sedona_raster.py
+++ b/python/sedona/spark/raster/sedona_raster.py
@@ -18,7 +18,7 @@
from abc import ABC, abstractmethod
from typing import List, Optional
import json
-from xml.etree.ElementTree import Element, SubElement, tostring
+from xml.etree.ElementTree import Element, SubElement, tostring # nosec B405
import numpy as np
import rasterio # type: ignore
diff --git a/python/sedona/spark/stac/collection_client.py
b/python/sedona/spark/stac/collection_client.py
index 15eabe7929..972dd0c140 100644
--- a/python/sedona/spark/stac/collection_client.py
+++ b/python/sedona/spark/stac/collection_client.py
@@ -163,7 +163,7 @@ class CollectionClient:
)
)
except (ValueError, TypeError, AttributeError):
- # Skip invalid geometries rather than failing # nosec B112
+ # Skip invalid geometries rather than failing
continue
if geometry_conditions: