Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/actions/tests/reporting/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@
pull_policy: 'if_not_present'
ECR: ${{ steps.ecr.outputs.registry }}
run: |
docker compose -p auto -f pro-ha.yml -f deps_pro-ha.yml -f ${{ matrix.envfiles.db }}.yml -f ${{ matrix.envfiles.cache }}.yml --env-file versions.env --profile all logs | sort > ${{ github.workspace }}/docker-compose.log
# Cap log collection: `docker compose logs` can hang if a container is
# unresponsive, which otherwise runs the job to its full timeout. `timeout`
# kills it after 5m; a miss just means slightly truncated diagnostic logs.

Check warning on line 54 in .github/actions/tests/reporting/action.yaml

View check run for this annotation

probelabs / Visor: security

security Issue

The redirection of stderr (`2>&1`) to the log file, which is subsequently printed to the GitHub Actions logs, increases the risk of exposing sensitive information. While the previous implementation already captured stdout, stderr may contain more verbose error details, stack traces, or configuration issues that could inadvertently include secrets, internal paths, or other sensitive data from the test environment.
Raw output
Before printing the combined logs to the GitHub Actions output, consider scrubbing them for potential secrets (e.g., API keys, passwords, connection strings). Alternatively, validate that no service running within the Docker Compose setup ever prints sensitive information to stderr on failure.
# (Composite-action steps can't take timeout-minutes, so we bound the cmd.)
timeout 300 docker compose -p auto -f pro-ha.yml -f deps_pro-ha.yml -f ${{ matrix.envfiles.db }}.yml -f ${{ matrix.envfiles.cache }}.yml --env-file versions.env --profile all logs > ${{ github.workspace }}/docker-compose.raw.log 2>&1 \
|| echo "::warning::docker compose logs did not complete within 300s; logs may be truncated"
sort ${{ github.workspace }}/docker-compose.raw.log > ${{ github.workspace }}/docker-compose.log
echo "::group::DockerLogs"
cat ${{ github.workspace }}/docker-compose.log
echo "::endgroup::"
Expand Down
Loading