Skip to content

Commit 53946d6

Browse files
committed
Address review items
Linting, vulnerabilities, etc. Signed-off-by: Eric Searcy <[email protected]>
1 parent b65eac0 commit 53946d6

File tree

5 files changed

+25
-18
lines changed

5 files changed

+25
-18
lines changed

playbooks/projects/recreate_root_project/root.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ recreate_root_project:
3131
parent_uid: ""
3232
stage: ""
3333
{% set created_at = now_z() %}
34-
# Wrap in quotes to ensure YAML doesn't intrepret it as a timestamp and
34+
# Wrap in quotes to ensure YAML doesn't interpret it as a timestamp and
3535
# loose our preferred formatting on output.
3636
created_at: "{{ created_at }}"
3737
updated_at: "{{ created_at }}"

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ version = "0.1.0"
77
requires-python = "~=3.12.5"
88
dependencies = [
99
"faker>=37.12.0",
10-
"jinja2>=3.1.5",
10+
"jinja2>=3.1.6",
1111
"jmespath>=1.0.1",
1212
"names-generator>=0.2.0",
1313
"nats-py>=2.9.0",
1414
"pydantic>=2.10.5",
1515
"python-dotenv>=1.0.1",
1616
"python-lorem>=1.3.0.post3",
1717
"pyyaml>=6.0.2",
18-
"requests>=2.32.3",
18+
"requests>=2.32.4",
1919
"structlog>=24.4.0",
20+
"urllib3>=2.5.0",
2021
]
2122

2223
[project.scripts]

scripts/mock-heimdall-jwt.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ if [ -z "$key_id" ]; then
3030
fi
3131

3232
pem_temp_dir=$(mktemp -d)
33-
kubectl get secret/heimdall-signer-cert -n lfx -o json | jq -r '.data["signer.pem"]' | base64 --decode > ${pem_temp_dir}/signer.pem
33+
kubectl get secret/heimdall-signer-cert -n lfx -o json | jq -r '.data["signer.pem"]' | base64 --decode > "${pem_temp_dir}"/signer.pem
3434

3535
jwt encode \
3636
--alg PS256 \
37-
--kid $key_id \
37+
--kid "$key_id" \
3838
--exp=+300s \
3939
--nbf +0s \
4040
--jti "$(uuidgen)" \
@@ -47,6 +47,6 @@ jwt encode \
4747

4848
jwt_result=$?
4949

50-
rm -rf ${pem_temp_dir}
50+
rm -rf "${pem_temp_dir}"
5151

5252
exit $jwt_result

src/lfx_v2_mockdata/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
import yaml
4444
from dotenv import load_dotenv
4545
from faker import Faker
46-
from jinja2 import Environment, FileSystemLoader
46+
from jinja2 import Environment, FileSystemLoader, select_autoescape
4747
from names_generator import generate_name
4848
from nats.aio.client import Client as NatsClient
4949
from nats.errors import TimeoutError
@@ -325,6 +325,10 @@ def yaml_render(template_dir, yaml_file):
325325
# Create an environment restricted to the passed template directory.
326326
env = Environment(
327327
loader=FileSystemLoader(searchpath=template_dir),
328+
autoescape=select_autoescape(
329+
default_for_string=True,
330+
default=True,
331+
),
328332
)
329333
# Add helper functions to the Jinja2 environment.
330334
env.globals["environ"] = dict(os.environ)

uv.lock

Lines changed: 13 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)