diff --git a/dockerfile b/dockerfile index db9c15b..8189cd1 100644 --- a/dockerfile +++ b/dockerfile @@ -20,6 +20,10 @@ WORKDIR /app COPY . . +# This is necessary to fix "dubious ownership" issues you can encounter +# when scanning local repos +RUN git config --global safe.directory '*' + # Exports ENV SECRETMAGPIE_LISTEN_ADDR=0.0.0.0:8080 ENV SM_COMMAND "docker run punksecurity/secret-magpie --" diff --git a/template.html b/template.html index b81bb7f..6719cd1 100644 --- a/template.html +++ b/template.html @@ -164,15 +164,26 @@ ${data.secret}

- Context: ${data.context.split('\\n').join('
')}
+ Context:

Extra Context: - - ${data.extra_context.split('\n').join('
')} -
+

`; + + let context = eGui.querySelector("#context-code"); + let extra_context = eGui.querySelector("#context-code"); + + for (let line of data.context.split('\n')) { + context.appendChild(document.createTextNode(line)); + context.appendChild(document.createElement('br')); + } + + for (let line of data.extra_context.split('\n')) { + extra_context.appendChild(document.createTextNode(line)); + extra_context.appendChild(document.createElement('br')); + } } getGui() { @@ -869,7 +880,6 @@ background-color: #1d2024; cursor: pointer; } -