audit_public_files
Identify publicly accessible files within a specified Google Drive folder and export results to a Google Sheet for security review.
Instructions
Step 8 — Files accessible to "anyone with the link" or publicly.
These are the highest-risk files from a security stand-point.
Shared Drives can restrict this behaviour at the drive level, so
you need to know what you are inheriting.
Args:
user_email: The email of the user who owns the source folder.
folder_id: The ID of the source folder.
sheet_id: The ID of the Google Sheet for output.
sheet_name: The tab name (default: "public_files").
GAM command:
gam user <user_email> print filelist select <folder_id>
fields "id,name,mimeType,basicpermissions,owners"
filepath excludetrashed
permissionmatch type anyone endmatch
pmfilter oneitemperrow
todrive tdfileid <sheet_id> tdsheet "<sheet_name>"
tdupdatesheet tdretaintitle
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sheet_id | Yes | ||
| folder_id | Yes | ||
| sheet_name | No | public_files | |
| user_email | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |