Skip to content

Commit

Permalink
Replace envtpl with subvars
Browse files Browse the repository at this point in the history
  • Loading branch information
pschiffe committed Jan 6, 2024
1 parent 75bf96d commit 64db65a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions burp-ui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM rockylinux/rockylinux:9-ubi

RUN echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \
RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
&& echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \
&& echo 'tsflags=nodocs' >> /etc/dnf/dnf.conf \
&& echo 'assumeyes=True' >> /etc/dnf/dnf.conf \
&& dnf install dnf-plugins-core epel-release \
Expand All @@ -11,12 +12,12 @@ RUN echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \
python3-gevent \
python3-gunicorn \
python3-pip \
https://github.com/kha7iq/subvars/releases/download/v0.1.5/subvars_${arch}.rpm \
&& dnf clean all

RUN pip3 install --no-cache-dir \
'burp-ui[ldap_authentication]' \
'Werkzeug<3' \
envtpl \
&& mkdir -p /etc/burp /etc/burp.tpl

EXPOSE 5000
Expand Down
6 changes: 3 additions & 3 deletions burp-ui/burpui.cfg.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,15 @@ scookie = true
# application. You can also set it to 'none' although this is not recommended.
appsecret = random

{% if BURP_ENV_BUI_AGENT_PASSWORD is defined or BUI_AGENT_PASSWORD is defined %}
{{ if any .BURP_ENV_BUI_AGENT_PASSWORD .BUI_AGENT_PASSWORD -}}
[Agent:burp]
# bui-agent address
host = burp
# bui-agent port
port = 10000
# bui-agent password
password = {{ BURP_ENV_BUI_AGENT_PASSWORD | default(BUI_AGENT_PASSWORD) }}
password = {{ .BURP_ENV_BUI_AGENT_PASSWORD | default .BUI_AGENT_PASSWORD }}
# enable SSL
ssl = true
timeout = 0
{% endif %}
{{ end -}}
2 changes: 1 addition & 1 deletion burp-ui/docker-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ -z "$(ls -A /etc/burp)" ]; then
sed -i "s/appsecret = random/appsecret = ${BURPUI_APP_SECRET}/g" /etc/burp/burpui.cfg.tpl
fi

envtpl < /etc/burp/burpui.cfg.tpl > /etc/burp/burpui.cfg
subvars < /etc/burp/burpui.cfg.tpl > /etc/burp/burpui.cfg

exec /usr/bin/gunicorn-3 \
--worker-class gevent \
Expand Down

0 comments on commit 64db65a

Please sign in to comment.