Closed ethankhall closed 5 months ago
Example Output
scope doctor run
Additional Capture Data
Name | Value |
---|---|
node | /Users/ethan/.local/share/mise/installs/node/20/bin/node |
nodeVersion | v20.11.0 |
ruby | /usr/bin/ruby |
username | ethan |
fail
fail/file-exists
Command: echo "found file /Users/ethan/workspace/ethankhall/pity/examples/file-mod.txt"
Output:
found file /Users/ethan/workspace/ethankhall/pity/examples/file-mod.txt
Name | Value |
---|---|
Exit code | 0 |
Started at | 2024-05-04 19:01:50.618366 UTC |
Finished at | 2024-05-04 19:01:50.621153 UTC |
Command: test -f /Users/ethan/workspace/ethankhall/pity/examples/file-mod.txt
Output:
Name | Value |
---|---|
Exit code | 1 |
Started at | 2024-05-04 19:01:50.621472 UTC |
Finished at | 2024-05-04 19:01:50.623390 UTC |
Additional Capture Data
Name | Value |
---|---|
who am i | uid=501(ethan) gid=20(staff) groups=20(staff),101(access_bpf),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),33(_appstore),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh),400(com.apple.access_remote_ae) |
This PR does leave some of the existing report code (i.e. ReportBuilder
, OutputCapture.create_report_text
, and CaptureError.create_report_text
) still around.
Oo good callout. Updated to remove/move them.
One thing I'd like to do is make a trait that can be used when running commands, so that "FoundConfig" object doesn't need to be passed around / a struct that can be abstracted out to be re-used everywhere.
With this change, a group is now able to provide a new field
reportExtraDetails
, that contains a map ofstring:string
, this map will run after the group has executed regardless if it succeeded or failed.The output will be placed into a table in the markdown report.
This allows groups to add metadata about their targets to reports, making the reports more useful.
This change includes some refactoring work (mainly around naming) that will come in a later PR. There is also some refactoring to be done around de-duplicating data, but wanted to exclude that for now as this PR is already large.