Skip to content

Commit d7f09da

Browse files
authored
Merge branch 'KelvinTegelaar:master' into master
2 parents dfd197b + edd3481 commit d7f09da

132 files changed

Lines changed: 5820 additions & 1030 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/scripts/validate-json.mjs‎

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import { readFile, readdir, writeFile, appendFile } from "node:fs/promises";
2+
import path from "node:path";
3+
4+
// Usage: node validate-json.mjs [--strip <prefix>] <dir> [dir...]
5+
// --strip removes a leading path prefix from reported filenames, so a PR checked
6+
// out into a subdirectory still reports repo-relative paths.
7+
const argv = process.argv.slice(2);
8+
let strip = "";
9+
const roots = [];
10+
for (let i = 0; i < argv.length; i++) {
11+
if (argv[i] === "--strip") {
12+
strip = argv[++i] ?? "";
13+
} else {
14+
roots.push(argv[i]);
15+
}
16+
}
17+
18+
async function collect(dir) {
19+
let entries;
20+
try {
21+
entries = await readdir(dir, { withFileTypes: true });
22+
} catch (error) {
23+
if (error.code === "ENOENT") return [];
24+
throw error;
25+
}
26+
const files = [];
27+
for (const entry of entries) {
28+
const full = path.join(dir, entry.name);
29+
if (entry.isDirectory()) {
30+
if (entry.name === "node_modules") continue;
31+
files.push(...(await collect(full)));
32+
} else if (entry.name.endsWith(".json")) {
33+
files.push(full);
34+
}
35+
}
36+
return files;
37+
}
38+
39+
const report = (file) => {
40+
const normalised = file.split(path.sep).join("/");
41+
return strip && normalised.startsWith(strip) ? normalised.slice(strip.length) : normalised;
42+
};
43+
44+
const failures = [];
45+
let checked = 0;
46+
47+
for (const root of roots) {
48+
for (const file of await collect(root)) {
49+
checked++;
50+
// Strip a leading UTF-8 BOM: it's tolerated by PowerShell's ConvertFrom-Json
51+
// (how the API loads these files) but rejected by Node's JSON.parse.
52+
const contents = (await readFile(file, "utf8")).replace(/^\uFEFF/, "");
53+
try {
54+
JSON.parse(contents);
55+
} catch (error) {
56+
failures.push({ file: report(file), message: error.message.replace(/\r?\n/g, " ") });
57+
}
58+
}
59+
}
60+
61+
for (const { file, message } of failures) {
62+
// Annotate the PR diff via a GitHub Actions error command.
63+
console.log(`::error file=${file}::${message}`);
64+
}
65+
console.log(`Checked ${checked} JSON file(s), ${failures.length} invalid.`);
66+
67+
// Hand the results to the workflow so it can comment on the PR.
68+
if (process.env.GITHUB_OUTPUT) {
69+
await appendFile(process.env.GITHUB_OUTPUT, `invalid_count=${failures.length}\n`);
70+
}
71+
await writeFile("json-validation-results.json", JSON.stringify(failures, null, 2));
72+
73+
process.exit(failures.length > 0 ? 1 : 0);
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
---
2+
name: Validate JSON
3+
on:
4+
# pull_request_target (not pull_request) so the token can comment on fork PRs.
5+
# The PR's own code is never executed: it is checked out into ./pr as data only,
6+
# and parsed by the validator script from the trusted base checkout.
7+
pull_request_target:
8+
types: [opened, synchronize, reopened]
9+
branches:
10+
- main
11+
- dev
12+
paths:
13+
- "Config/**/*.json"
14+
- "Tools/**/*.json"
15+
- "AddMSPApp/**/*.json"
16+
- ".github/workflows/Validate_JSON.yml"
17+
- ".github/scripts/validate-json.mjs"
18+
push:
19+
branches:
20+
- dev
21+
paths:
22+
- "Config/**/*.json"
23+
- "Tools/**/*.json"
24+
- "AddMSPApp/**/*.json"
25+
- ".github/workflows/Validate_JSON.yml"
26+
- ".github/scripts/validate-json.mjs"
27+
concurrency:
28+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.event.pull_request.number || github.ref }}
29+
cancel-in-progress: true
30+
permissions:
31+
contents: read
32+
pull-requests: write
33+
jobs:
34+
validate:
35+
name: Parse JSON in Config, Tools and AddMSPApp
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout base (trusted validator script)
39+
uses: actions/checkout@v6
40+
41+
- name: Checkout PR head (untrusted, data only)
42+
if: github.event_name == 'pull_request_target'
43+
uses: actions/checkout@v6
44+
with:
45+
repository: ${{ github.event.pull_request.head.repo.full_name }}
46+
ref: ${{ github.event.pull_request.head.sha }}
47+
path: pr
48+
persist-credentials: false
49+
50+
- name: Validate JSON files
51+
id: validate
52+
continue-on-error: true
53+
env:
54+
ROOT: ${{ github.event_name == 'pull_request_target' && 'pr/' || '' }}
55+
run: >-
56+
node .github/scripts/validate-json.mjs --strip "$ROOT"
57+
"${ROOT}Config" "${ROOT}Tools" "${ROOT}AddMSPApp"
58+
59+
- name: Comment on PR
60+
if: github.event_name == 'pull_request_target'
61+
uses: actions/github-script@v9
62+
with:
63+
github-token: ${{ secrets.GITHUB_TOKEN }}
64+
script: |
65+
const fs = require('fs');
66+
const marker = '<!-- validate-json -->';
67+
const resultsFile = 'json-validation-results.json';
68+
if (!fs.existsSync(resultsFile)) {
69+
// The validator crashed before reporting; let its own error stand.
70+
core.warning('No validation results found — skipping PR comment.');
71+
return;
72+
}
73+
const failures = JSON.parse(fs.readFileSync(resultsFile, 'utf8'));
74+
75+
// Find a previous comment from this workflow so we update instead of piling up.
76+
const { data: comments } = await github.rest.issues.listComments({
77+
...context.repo,
78+
issue_number: context.issue.number,
79+
per_page: 100,
80+
});
81+
const existing = comments.find(
82+
(c) => c.user.type === 'Bot' && c.body.includes(marker)
83+
);
84+
85+
let body;
86+
if (failures.length > 0) {
87+
const list = failures
88+
.map(({ file, message }) => `- \`${file}\`\n > ${message}`)
89+
.join('\n');
90+
body =
91+
`${marker}\n### ⚠️ Invalid JSON detected\n\n` +
92+
`${failures.length} JSON file(s) in this PR could not be parsed. ` +
93+
`These files are loaded directly by CIPP, so a syntax error here breaks the app at runtime.\n\n` +
94+
`${list}\n\n` +
95+
`Please fix the syntax and push again — this comment will update automatically.`;
96+
} else if (existing) {
97+
body = `${marker}\n### ✅ JSON is valid\n\nAll JSON files in \`Config\`, \`Tools\` and \`AddMSPApp\` parse correctly. Thanks for fixing it!`;
98+
} else {
99+
// Nothing was ever broken — stay quiet.
100+
return;
101+
}
102+
103+
if (existing) {
104+
await github.rest.issues.updateComment({
105+
...context.repo,
106+
comment_id: existing.id,
107+
body,
108+
});
109+
} else {
110+
await github.rest.issues.createComment({
111+
...context.repo,
112+
issue_number: context.issue.number,
113+
body,
114+
});
115+
}
116+
117+
- name: Fail if any JSON is invalid
118+
if: steps.validate.outputs.invalid_count != '0'
119+
run: |
120+
echo "::error::${{ steps.validate.outputs.invalid_count }} invalid JSON file(s). See annotations above."
121+
exit 1

‎AddMSPApp/datto.app.xml‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
<ApplicationInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ToolVersion="1.8.3.0">
2-
<Name>install.ps1</Name>
3-
<UnencryptedContentSize>693</UnencryptedContentSize>
4-
<FileName>datto.intunewin</FileName>
5-
<SetupFile>install.ps1</SetupFile>
6-
<EncryptionInfo>
7-
<EncryptionKey>jobB9Ga7J3CbO6acWJyvBRE56nFXwqGfcnGfZRMsJC4=</EncryptionKey>
8-
<MacKey>53SOzs0l6Po2btsGFSMZgkV8vwhH+PxTN8BZDUcfWfg=</MacKey>
9-
<InitializationVector>VjM/osrvPElbu79J+mdXuw==</InitializationVector>
10-
<Mac>UZZXO53Np/tG6Ms+qvwLcNOeD1GRH6NRPFg/TuMz39M=</Mac>
11-
<ProfileIdentifier>ProfileVersion1</ProfileIdentifier>
12-
<FileDigest>KtAWAl29064LG0eyDinbDs0JUbK+EK7GsJovu8obBM4=</FileDigest>
13-
<FileDigestAlgorithm>SHA256</FileDigestAlgorithm>
14-
</EncryptionInfo>
1+
<ApplicationInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ToolVersion="1.8.3.0">
2+
<Name>install.ps1</Name>
3+
<UnencryptedContentSize>693</UnencryptedContentSize>
4+
<FileName>datto.intunewin</FileName>
5+
<SetupFile>install.ps1</SetupFile>
6+
<EncryptionInfo>
7+
<EncryptionKey>jobB9Ga7J3CbO6acWJyvBRE56nFXwqGfcnGfZRMsJC4=</EncryptionKey>
8+
<MacKey>53SOzs0l6Po2btsGFSMZgkV8vwhH+PxTN8BZDUcfWfg=</MacKey>
9+
<InitializationVector>VjM/osrvPElbu79J+mdXuw==</InitializationVector>
10+
<Mac>UZZXO53Np/tG6Ms+qvwLcNOeD1GRH6NRPFg/TuMz39M=</Mac>
11+
<ProfileIdentifier>ProfileVersion1</ProfileIdentifier>
12+
<FileDigest>KtAWAl29064LG0eyDinbDs0JUbK+EK7GsJovu8obBM4=</FileDigest>
13+
<FileDigestAlgorithm>SHA256</FileDigestAlgorithm>
14+
</EncryptionInfo>
1515
</ApplicationInfo>

‎Config/CIPPDBCacheTypes.json‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,21 @@
294294
"friendlyName": "SharePoint Site Usage",
295295
"description": "SharePoint site usage statistics"
296296
},
297+
{
298+
"type": "SiteActivity",
299+
"friendlyName": "Site Activity",
300+
"description": "Per-site activity with siteType classification (SharePoint, SharePointAndTeams, OneDrive) and separate workload activity columns"
301+
},
297302
{
298303
"type": "SharePointSharingLinks",
299304
"friendlyName": "SharePoint & OneDrive Sharing Links",
300305
"description": "Sharing links and external grants on SharePoint and OneDrive files and folders"
301306
},
307+
{
308+
"type": "SharePointPermissions",
309+
"friendlyName": "SharePoint Permissions",
310+
"description": "Site and document library permission assignments, including libraries that no longer inherit and grants to tenant-wide claims such as Everyone except external users"
311+
},
302312
{
303313
"type": "OfficeActivations",
304314
"friendlyName": "Office Activations",

‎Config/FeatureFlags.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,22 @@
2525
{
2626
"Id": "SuperAdminNG",
2727
"Name": "Super Admin",
28-
"Description": "Additional super admin pages for CIPP instances (CIPP Users, SSO, Container management).",
28+
"Description": "Additional super admin pages for CIPP instances (CIPP Users, SSO, Container management, Custom Domains).",
2929
"Enabled": false,
3030
"AllowUserToggle": false,
3131
"Timers": [],
3232
"Endpoints": [
3333
"ExecCIPPUsers",
3434
"ListCIPPUsers",
3535
"ExecContainerManagement",
36+
"ExecAppServiceDomains",
3637
"ListContainerLogs",
3738
"ListWorkerHealth"
3839
],
3940
"Pages": [
4041
"/cipp/advanced/super-admin/cipp-users",
4142
"/cipp/advanced/super-admin/container",
43+
"/cipp/advanced/super-admin/custom-domains",
4244
"/cipp/advanced/container-logs",
4345
"/cipp/advanced/worker-health"
4446
],

‎Config/standards.json‎

Lines changed: 65 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,12 @@
5151
"name": "standards.CopilotSettings.allowWebSearch",
5252
"options": [
5353
{ "label": "Do not configure", "value": "donotconfigure" },
54-
{ "label": "Enabled", "value": "1" },
55-
{ "label": "Disabled", "value": "0" }
54+
{ "label": "Enabled in Microsoft 365 Copilot and Microsoft 365 Copilot Chat", "value": "2" },
55+
{ "label": "Disabled in Microsoft 365 Copilot and Microsoft 365 Copilot Chat", "value": "1" },
56+
{
57+
"label": "Disabled in Microsoft 365 Copilot Work mode, Enabled in Microsoft 365 Copilot Chat",
58+
"value": "0"
59+
}
5660
]
5761
},
5862
{
@@ -1459,10 +1463,23 @@
14591463
"cat": "Entra (AAD) Standards",
14601464
"tag": ["CISA (MS.AAD.21.1v1)", "SMB1001 (2.8)"],
14611465
"appliesToTest": ["SMB1001_2_8", "ZTNA21868"],
1462-
"helpText": "Restricts M365 group creation to certain admin roles. This disables the ability to create Teams, SharePoint sites, Planner, etc",
1463-
"docsDescription": "Users by default are allowed to create M365 groups. This restricts M365 group creation to certain admin roles. This disables the ability to create Teams, SharePoint sites, Planner, etc",
1464-
"executiveText": "Restricts the creation of Microsoft 365 groups, Teams, and SharePoint sites to authorized administrators, preventing uncontrolled proliferation of collaboration spaces. This ensures proper governance, naming conventions, and resource management while maintaining oversight of all collaborative environments.",
1465-
"addedComponent": [],
1466+
"helpText": "Restricts M365 group creation to certain admin roles. This disables the ability to create Teams, SharePoint sites, Planner, etc. Optionally allows members of a specific security group to keep creating groups (GroupCreationAllowedGroupId).",
1467+
"docsDescription": "Users by default are allowed to create M365 groups. This restricts M365 group creation to certain admin roles. This disables the ability to create Teams, SharePoint sites, Planner, etc. Optionally, a security group can be named whose members remain allowed to create groups; the group is resolved by display name in each tenant and can be created automatically when it does not exist. When no group is named, the existing GroupCreationAllowedGroupId value in the tenant is left untouched.",
1468+
"executiveText": "Restricts the creation of Microsoft 365 groups, Teams, and SharePoint sites to authorized administrators, preventing uncontrolled proliferation of collaboration spaces. This ensures proper governance, naming conventions, and resource management while maintaining oversight of all collaborative environments. An approved group of designated users can optionally retain the ability to create groups.",
1469+
"addedComponent": [
1470+
{
1471+
"type": "textField",
1472+
"name": "standards.DisableM365GroupUsers.AllowedGroupName",
1473+
"label": "Optional: name of the group whose members may still create M365 groups",
1474+
"required": false
1475+
},
1476+
{
1477+
"type": "switch",
1478+
"name": "standards.DisableM365GroupUsers.CreateGroup",
1479+
"label": "Create the allowed group if it does not exist",
1480+
"required": false
1481+
}
1482+
],
14661483
"label": "Disable M365 Group creation by users",
14671484
"impact": "Low Impact",
14681485
"impactColour": "info",
@@ -1614,6 +1631,33 @@
16141631
"recommendedBy": ["CIS", "CIPP"],
16151632
"requiredCapabilities": ["AAD_PREMIUM", "AAD_PREMIUM_P2"]
16161633
},
1634+
{
1635+
"name": "standards.DisableInactiveUsers",
1636+
"cat": "Entra (AAD) Standards",
1637+
"tag": ["CMMC (IA.L2-3.5.6)", "NIST SP 800-171 (3.5.6)"],
1638+
"helpText": "Blocks login for cloud-only member users that have not signed in for a configurable number of days (minimum 30). Includes accounts that have never signed in when the account is older than the threshold. Hybrid (on-premises synced) users are skipped. Users without sign-in activity data are not disabled.",
1639+
"docsDescription": "Disables enabled Member user accounts after a defined period of inactivity (minimum 30 days), supporting CMMC IA.L2-3.5.6 / NIST SP 800-171 3.5.6. Inactivity is based on signInActivity.lastSuccessfulSignInDateTime. Accounts that have never signed in (signInActivity present but no successful sign-in) are included when createdDateTime is older than the threshold. Users missing signInActivity entirely are skipped so incomplete Graph data cannot cause accidental disables. Hybrid-synced (onPremisesSyncEnabled) users are skipped because Entra disable often will not stick. Recently re-enabled accounts (last 7 days) are also skipped. Values below 30 days are rejected at runtime.",
1640+
"executiveText": "Automatically disables unused employee accounts that have not signed in for a configured number of days, reducing risk from dormant accounts and supporting CMMC / NIST inactive-identifier requirements. Hybrid directory-synced accounts are left alone so on-premises identity remains the source of truth for those users.",
1641+
"addedComponent": [
1642+
{
1643+
"type": "number",
1644+
"name": "standards.DisableInactiveUsers.days",
1645+
"required": true,
1646+
"defaultValue": 180,
1647+
"label": "Days of inactivity (minimum 30)",
1648+
"validators": {
1649+
"min": { "value": 30, "message": "Minimum value is 30" }
1650+
}
1651+
}
1652+
],
1653+
"label": "Disable Member accounts that have not logged on for a number of days",
1654+
"impact": "High Impact",
1655+
"impactColour": "danger",
1656+
"addedDate": "2026-07-22",
1657+
"powershellEquivalent": "Get-MgUser -Property SignInActivity & Update-MgUser -AccountEnabled $false",
1658+
"recommendedBy": ["CIPP", "CMMC"],
1659+
"requiredCapabilities": ["AAD_PREMIUM", "AAD_PREMIUM_P2"]
1660+
},
16171661
{
16181662
"name": "standards.OauthConsent",
16191663
"cat": "Entra (AAD) Standards",
@@ -3219,6 +3263,21 @@
32193263
"powershellEquivalent": "Get-Mailbox & Update-MgUser",
32203264
"recommendedBy": ["CIS", "CIPP"]
32213265
},
3266+
{
3267+
"name": "standards.TeamsDisableResourceAccounts",
3268+
"cat": "Teams Standards",
3269+
"tag": ["NIST CSF 2.0 (PR.AA-01)"],
3270+
"helpText": "Blocks sign-in for all Teams resource accounts used by Auto Attendants and Call Queues. Microsoft's guidance is to block sign-in for resource accounts as they do not require an interactive login to function.",
3271+
"docsDescription": "Teams resource accounts (the accounts backing Auto Attendants and Call Queues) do not require interactive sign-in to function. If sign-in is enabled and the password is reset, the account can be logged into directly, which presents a security risk. Microsoft's guidance is to block sign-in for these accounts. Accounts that are synced from on-premises AD are excluded, as account state is managed in the on-premises AD.",
3272+
"executiveText": "Prevents direct login to the service accounts that power phone system features like Auto Attendants and Call Queues. These accounts work without anyone signing into them, so blocking sign-in removes an unnecessary attack surface while keeping the phone system fully functional.",
3273+
"addedComponent": [],
3274+
"label": "Block sign-in for Teams resource accounts",
3275+
"impact": "Medium Impact",
3276+
"impactColour": "warning",
3277+
"addedDate": "2026-07-17",
3278+
"powershellEquivalent": "Get-CsOnlineApplicationInstance & Update-MgUser",
3279+
"recommendedBy": ["Microsoft", "CIPP"]
3280+
},
32223281
{
32233282
"name": "standards.DisableResourceMailbox",
32243283
"cat": "Exchange Standards",

0 commit comments

Comments
 (0)