macadmins / macadmins/osquery-extension

`/usr/bin/profiles show -type enrollment` not being throttled

Open
#61 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
132
Forks
41
Avg merge
1d 48m
Merged PRs (30d)
3

Description

The code intent is to throttle access to `profiles show -type enrollment` command: https://github.com/macadmins/osquery-extension/blob/5461c453ddbf857704d33cdeae1bc6b0429dca6a/tables/mdm/mdm.go#L202

However, this never happens because the file it checks is never created:
```
/private/var/db/ConfigurationProfiles/Settings/.cloudConfigTimerCheck
```

Also, the latest manpage states that the limit is 10 times per 23 hours, so the throttling can be reduced to <3 hours per request.

image

Contributor guide

Open the contributing guide

Research direction

Start in tables/mdm/mdm.go around line 202 and inspect how the .cloudConfigTimerCheck path is used for throttling. Compare that behavior with the latest profiles manpage and confirm the intended limit of 10 requests per 23 hours, including the reported interval of under three hours between requests. Done means the enrollment command is actually throttled according to that limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.