mirror of
https://github.com/KeygraphHQ/shannon.git
synced 2026-02-12 09:12:50 +00:00
fix: prevent deliverables from being lost during agent retry rollbacks (#112)
Deliverables saved by agents were never committed to git because git identity was not configured in the Docker container. This left them as untracked files, which git clean -fd destroyed whenever another agent's retry triggered a workspace rollback. Moves git config after ENV HOME=/tmp so the config is written to /tmp/.gitconfig where git actually looks at runtime.
This commit is contained in:
@@ -139,9 +139,6 @@ RUN mkdir -p /app/sessions /app/deliverables /app/repos /app/configs && \
|
|||||||
# Switch to non-root user
|
# Switch to non-root user
|
||||||
USER pentest
|
USER pentest
|
||||||
|
|
||||||
# Configure Git to trust all directories
|
|
||||||
RUN git config --global --add safe.directory '*'
|
|
||||||
|
|
||||||
# Set environment variables
|
# Set environment variables
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENV PATH="/usr/local/bin:$PATH"
|
ENV PATH="/usr/local/bin:$PATH"
|
||||||
@@ -153,5 +150,10 @@ ENV HOME=/tmp
|
|||||||
ENV XDG_CACHE_HOME=/tmp/.cache
|
ENV XDG_CACHE_HOME=/tmp/.cache
|
||||||
ENV XDG_CONFIG_HOME=/tmp/.config
|
ENV XDG_CONFIG_HOME=/tmp/.config
|
||||||
|
|
||||||
|
# Configure Git identity and trust all directories
|
||||||
|
RUN git config --global user.email "agent@localhost" && \
|
||||||
|
git config --global user.name "Pentest Agent" && \
|
||||||
|
git config --global --add safe.directory '*'
|
||||||
|
|
||||||
# Set entrypoint
|
# Set entrypoint
|
||||||
ENTRYPOINT ["node", "dist/shannon.js"]
|
ENTRYPOINT ["node", "dist/shannon.js"]
|
||||||
|
|||||||
Reference in New Issue
Block a user