mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-01-10 06:48:04 -05:00
### CHANGES - Introduce `cmd` directory for all main application binaries. - Move all Go packages into the `internal` directory. - Rename the `restapi` package to `server` for clarity. - Consolidate patterns and strategies into a new `data` directory. - Group all auxiliary scripts into a new `scripts` directory. - Move all documentation and images into a `docs` directory. - Update all Go import paths to reflect the new structure. - Adjust CI/CD workflows and build commands for new layout.
25 lines
748 B
Bash
Executable File
25 lines
748 B
Bash
Executable File
#!/bin/bash
|
|
# remote-security-report.sh
|
|
# Usage: remote-security-report.sh cert host [report_name]
|
|
|
|
cert_path="$1"
|
|
host="$2"
|
|
report_name="${3:-report}"
|
|
temp_file="/tmp/security-report-${report_name}.txt"
|
|
|
|
# Copy the security report script to remote host
|
|
scp -i "$cert_path" /usr/local/bin/security-report.sh "${host}:~/security-report.sh" >&2
|
|
|
|
# Make it executable and run it on remote host
|
|
ssh -i "$cert_path" "$host" "chmod +x ~/security-report.sh && sudo ~/security-report.sh ${temp_file}" >&2
|
|
|
|
# Copy the report back
|
|
scp -i "$cert_path" "${host}:${temp_file}" "${temp_file}" >&2
|
|
|
|
# Cleanup remote files
|
|
ssh -i "$cert_path" "$host" "rm ~/security-report.sh ${temp_file}" >&2
|
|
|
|
# Output the local file path for fabric to read
|
|
echo "${temp_file}"
|
|
|