快速入門
在幾分鐘內完成掃描、預覽、套用與復原。
幾分鐘內從零開始強化一台主機。apply 之前的每一步都是唯讀的。
1. 掃描
shell
tmaegis scan --auto-detect--auto-detect 會辨識作業系統與已安裝的軟體,然後僅執行適用的規則。若要自行指定平台,請使用 --target,例如 --target linux 或 --target postgres。
2. 儲存報告
shell
tmaegis scan --auto-detect --format html --output report.html
tmaegis scan --auto-detect --format sarif --output tmaegis.sarif3. 預覽修補
shell
sudo tmaegis apply --auto-detect --dry-run試執行會準確顯示將要變更的內容,且不會修改任何項目。
4. 套用
shell
sudo tmaegis apply --auto-detect --deadman-timeout 60每次變更前都會建立快照。設定檔在取代正在使用的檔案之前會先進行語法檢查,例如使用 sshd -t。啟用確認計時器後,您必須在逾時前確認,否則所有變更都會被復原。
5. 復原
shell
tmaegis rollback --list # restore points
sudo tmaegis rollback # latest snapshot
sudo tmaegis rollback --id <snapshot-id>雲端帳號
shell
tmaegis scan --target aws # read-only, uses your CLI credentials
tmaegis apply --target aws --terraform-out ./proposed # writes Terraform, never changes the account網路設備
shell
tmaegis scan --target cisco-ios --device-config r1.cfg無法自動檢查的建議預設會被略過。加上 --include-manual 即可連同操作說明一併列出。