Skip to content

Commit 448a1f4

Browse files
committed
merge
1 parent 030cedd commit 448a1f4

File tree

232 files changed

+270423
-0
lines changed

Some content is hidden

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

232 files changed

+270423
-0
lines changed

.eslintrc 2.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"extends": "next/core-web-vitals",
3+
"rules": {
4+
"@next/next/no-img-element": "off",
5+
"@next/next/no-page-custom-font": "off",
6+
"jsx-a11y/alt-text": "off",
7+
"react/display-name": "off",
8+
"react/no-children-prop": "off",
9+
"react/no-unescaped-entities": "off",
10+
"react/jsx-max-props-per-line": [
11+
0,
12+
{
13+
"maximum": 10
14+
}
15+
]
16+
}
17+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Security Reports
4+
url: https://github.com/KelvinTegelaar/CIPP/security/advisories
5+
about: Please report security vulnerabilities here.
6+
- name: Community Discord
7+
url: https://discord.gg/cyberdrain
8+
about: Join our discord community here.
9+
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: "Handle Comment Commands"
2+
3+
on:
4+
issue_comment:
5+
types:
6+
- created
7+
8+
jobs:
9+
handle_comment:
10+
runs-on: ubuntu-latest
11+
# We need permissions to modify issue comments.
12+
# 'issues: write' is required for deleting comments.
13+
permissions:
14+
issues: write
15+
16+
steps:
17+
# 1) If the comment includes '!notasponsor', delete it using GitHub Script
18+
- name: Delete !notasponsor comment
19+
if: contains(github.event.comment.body, '!notasponsor')
20+
uses: actions/github-script@v6
21+
with:
22+
github-token: ${{ secrets.GITHUB_TOKEN }}
23+
script: |
24+
await github.rest.issues.deleteComment({
25+
owner: context.repo.owner,
26+
repo: context.repo.repo,
27+
comment_id: context.payload.comment.id
28+
});
29+
30+
# 2) Post a sponsor-specific reply
31+
- name: Reply to !notasponsor
32+
if: contains(github.event.comment.body, '!notasponsor')
33+
uses: peter-evans/create-or-update-comment@v3
34+
with:
35+
issue-number: ${{ github.event.issue.number }}
36+
body: |
37+
Hello,
38+
39+
Thank you for your interest in improving CIPP!
40+
To keep our development process focused and manageable, **feature requests are limited to paying users**. This policy helps us prioritize improvements that directly benefit those actively supporting CIPP and ensures we can sustain our development and support.
41+
42+
When a sponsor makes a feature request, their support covers training, development, documentation, and security checks. Allowing non-sponsor requests could lead to a backlog that slows down updates and stretches resources thin, ultimately affecting the quality and sustainability of CIPP.
43+
44+
While we’ve closed this request, we appreciate your input. You’re always welcome to participate in ongoing discussions or contribute to open issues. If you are a developer, feel free to open a PR that includes your feature request or comment "**I’d like to work on this!**" to assign the issue to yourself.
45+
46+
**Did you get this notification in error?** Reply with a screenshot of your sponsorship payment and we’ll reopen the issue.
47+
48+
_Thank you for understanding,_
49+
**The CIPP Team**
50+
51+
# 3) If the comment includes '!support', classify as a support request
52+
- name: Reply to !support
53+
if: contains(github.event.comment.body, '!support')
54+
uses: peter-evans/create-or-update-comment@v3
55+
with:
56+
issue-number: ${{ github.event.issue.number }}
57+
body: |
58+
Hello,
59+
60+
Thank you for reaching out! This report has been classified as a **support request** rather than a bug or feature request. To keep our development process focused, support requests are limited to paying users. This policy allows us to prioritize resources for those actively supporting CIPP, helping us maintain high-quality development and support.
61+
62+
Sponsors can contact our helpdesk directly via email for assistance with any issues or questions. For non-sponsor support, please refer to our documentation and community discussions—many questions have been answered there.
63+
64+
**Did you get this notification in error?** Reply with a screenshot of your sponsorship payment, and we’ll gladly reopen the request.
65+
66+
_Thank you for your understanding,_
67+
**The CIPP Team**
68+
69+
# 4) If the comment includes '!incomplete', note the bug or feature request is incomplete
70+
- name: Reply to !incomplete
71+
if: contains(github.event.comment.body, '!incomplete')
72+
uses: peter-evans/create-or-update-comment@v3
73+
with:
74+
issue-number: ${{ github.event.issue.number }}
75+
body: |
76+
Hello,
77+
78+
Thank you for your submission! It appears this **bug report or feature request is incomplete**. We need a clear description, steps to reproduce (for bugs), or a comprehensive overview of the requested feature.
79+
80+
Please submit a new request with all the necessary details. Without sufficient information, it’s difficult for contributors to triage or implement solutions.
81+
82+
_Thank you!_
83+
**The CIPP Team**
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CIPP Frontend Dev Build
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
if: github.event.repository.fork == false
12+
name: Build and Upload CIPP Frontend
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
# Checkout the repository
17+
- name: Checkout Code
18+
uses: actions/checkout@v4.2.2
19+
20+
# Set up Node.js
21+
- name: Get Node version
22+
id: get_node_version
23+
run: |
24+
node_raw_version=$(node -p "require('./package.json').engines.node")
25+
node_sanitized_version=$(echo $node_raw_version | sed -E 's/[^0-9.]+//g')
26+
echo "node_version=$node_sanitized_version" >> $GITHUB_OUTPUT
27+
28+
- name: Set up Node.js
29+
uses: actions/setup-node@v4.2.0
30+
with:
31+
node-version: ${{ steps.get_node_version.outputs.node_version }}
32+
33+
# Install dependencies
34+
- name: Install Dependencies
35+
run: yarn install
36+
37+
# Build the project
38+
- name: Build Project
39+
run: npm run build
40+
41+
# Create ZIP File in a New Source Directory
42+
- name: Prepare and Zip Build Files
43+
run: |
44+
mkdir -p build
45+
cp staticwebapp.config.json out/
46+
zip -r build/dev.zip out
47+
48+
# Upload to Azure Blob Storage
49+
- name: Azure Blob Upload
50+
uses: LanceMcCarthy/Action-AzureBlobUpload@v3.3.1
51+
with:
52+
connection_string: ${{ secrets.AZURE_CONNECTION_STRING }}
53+
container_name: cipp
54+
source_folder: build/
55+
destination_folder: /
56+
delete_if_exists: true
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CIPP Frontend Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
if: github.event.repository.fork == false
12+
name: Build and Upload CIPP Frontend
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
# Checkout the repository
17+
- name: Checkout Code
18+
uses: actions/checkout@v4.2.2
19+
20+
# Set up Node.js
21+
- name: Get Node version
22+
id: get_node_version
23+
run: |
24+
node_raw_version=$(node -p "require('./package.json').engines.node")
25+
node_sanitized_version=$(echo $node_raw_version | sed -E 's/[^0-9.]+//g')
26+
echo "node_version=$node_sanitized_version" >> $GITHUB_OUTPUT
27+
28+
- name: Set up Node.js
29+
uses: actions/setup-node@v4.2.0
30+
with:
31+
node-version: ${{ steps.get_node_version.outputs.node_version }}
32+
33+
# Install dependencies
34+
- name: Install Dependencies
35+
run: yarn install
36+
37+
# Build the project
38+
- name: Build Project
39+
run: npm run build
40+
41+
# Create ZIP File in a New Source Directory
42+
- name: Prepare and Zip Build Files
43+
run: |
44+
mkdir -p build
45+
cp staticwebapp.config.json out/
46+
zip -r build/latest.zip out
47+
48+
# Upload to Azure Blob Storage
49+
- name: Azure Blob Upload
50+
uses: LanceMcCarthy/Action-AzureBlobUpload@v3.3.1
51+
with:
52+
connection_string: ${{ secrets.AZURE_CONNECTION_STRING }}
53+
container_name: cipp
54+
source_folder: build/
55+
destination_folder: /
56+
delete_if_exists: true

.github/workflows/pr_check 2.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: PR Branch Check
2+
3+
on:
4+
# Using pull_request_target instead of pull_request for secure handling of fork PRs
5+
pull_request_target:
6+
# Only run on these PR events
7+
types: [opened, synchronize, reopened]
8+
# Only check PRs targeting these branches
9+
branches:
10+
- main
11+
- master
12+
13+
permissions:
14+
pull-requests: write
15+
issues: write
16+
17+
jobs:
18+
check-branch:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check and Comment on PR
22+
# Only process fork PRs with specific branch conditions
23+
# Must be a fork AND (source is main/master OR target is main/master)
24+
if: |
25+
github.event.pull_request.head.repo.fork == true &&
26+
((github.event.pull_request.head.ref == 'main' || github.event.pull_request.head.ref == 'master') ||
27+
(github.event.pull_request.base.ref == 'main' || github.event.pull_request.base.ref == 'master'))
28+
uses: actions/github-script@v7
29+
with:
30+
github-token: ${{ secrets.GITHUB_TOKEN }}
31+
script: |
32+
let message = '';
33+
34+
message += '🔄 If you are attempting to update your CIPP repo please follow the instructions at: https://docs.cipp.app/setup/self-hosting-guide/updating. Are you a sponsor? Contact the helpdesk for direct assistance with updating to the latest version.';
35+
message += '\n\n';
36+
37+
// Check if PR is targeting main/master
38+
if (context.payload.pull_request.base.ref === 'main' || context.payload.pull_request.base.ref === 'master') {
39+
message += '⚠️ PRs cannot target the main branch directly. If you are attempting to contribute code please PR to the dev branch.\n\n';
40+
}
41+
42+
// Check if PR is from a fork's main/master branch
43+
if (context.payload.pull_request.head.repo.fork &&
44+
(context.payload.pull_request.head.ref === 'main' || context.payload.pull_request.head.ref === 'master')) {
45+
message += '⚠️ This PR cannot be merged because it originates from your fork\'s main/master branch. If you are attempting to contribute code please PR from your dev branch or another non-main/master branch.\n\n';
46+
}
47+
48+
message += '🔒 This PR will now be automatically closed due to the above rules.';
49+
50+
// Post the comment
51+
await github.rest.issues.createComment({
52+
...context.repo,
53+
issue_number: context.issue.number,
54+
body: message
55+
});
56+
57+
// Close the PR
58+
await github.rest.pulls.update({
59+
...context.repo,
60+
pull_number: context.issue.number,
61+
state: 'closed'
62+
});

.vscode/settings 2.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
$Path = (Get-Item $PSScriptRoot).Parent.Parent.FullName
2+
3+
if (-not((Get-Command npm -ErrorAction SilentlyContinue) -or (Get-Command yarn -ErrorAction SilentlyContinue))) {
4+
throw 'npm or yarn is required to install the CIPP development environment.'
5+
}
6+
7+
if (-not(Get-Command yarn -ErrorAction SilentlyContinue)) {
8+
Write-Host 'Installing Yarn'
9+
npm install --global yarn
10+
}
11+
12+
if (-not(Get-Command azurite -ErrorAction SilentlyContinue)) {
13+
Write-Host 'Installing Azurite'
14+
yarn global add 'azurite'
15+
}
16+
17+
if (-not(Get-Command swa -ErrorAction SilentlyContinue)) {
18+
Write-Host 'Installing @azure/static-web-apps-cli'
19+
yarn global add '@azure/static-web-apps-cli'
20+
}
21+
22+
if (-not(Get-Command func -ErrorAction SilentlyContinue)) {
23+
Write-Host 'Installing Azure Functions Core Tools'
24+
yarn global add 'azure-functions-core-tools@4'
25+
}
26+
27+
if (-not(yarn global list | Select-String -Pattern 'next')) {
28+
Write-Host 'Installing Next.js'
29+
yarn global add 'next'
30+
}
31+
32+
yarn install --cwd (Join-Path $Path "CIPP") --network-timeout 500000
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Import-Module Microsoft.Graph
2+
Connect-MgGraph -Scopes 'DeviceManagementConfiguration.Read.All', 'DeviceManagementServiceConfig.Read.All'
3+
$i = 0
4+
$settingsUrl = "https://graph.microsoft.com/beta/deviceManagement/configurationSettings?`$top=999&`$skip=$i"
5+
$Settings = do {
6+
$settingsResponse = Invoke-MgGraphRequest -Method Get -Uri $settingsUrl
7+
Write-Host "Getting settings from $i to $($i + 999): $settingsUrl"
8+
if ($null -ne $settingsResponse.value) {
9+
foreach ($setting in $settingsResponse.value) {
10+
11+
$options = if ($setting.options -ne $null) {
12+
$setting.options | ForEach-Object {
13+
[pscustomobject]@{
14+
id = $_.itemId
15+
displayName = $_.displayName
16+
description = $_.description
17+
}
18+
}
19+
}
20+
21+
[pscustomobject]@{
22+
id = $setting.id
23+
displayName = $setting.displayName
24+
options = $options
25+
}
26+
}
27+
}
28+
$i += 999
29+
$settingsUrl = "https://graph.microsoft.com/beta/deviceManagement/configurationSettings?`$top=999&`$skip=$i"
30+
Write-Host "last setting is $($settingsResponse.value[-1].id)"
31+
} while ($null -ne $settingsResponse.value.id)

cspell 2.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"version": "0.2",
3+
"ignorePaths": [],
4+
"dictionaryDefinitions": [],
5+
"dictionaries": [],
6+
"words": [
7+
"CIPP",
8+
"CIPP-API",
9+
"Entra",
10+
"Intune",
11+
"GDAP",
12+
"OBEE",
13+
"AITM",
14+
"Passwordless",
15+
"Yubikey",
16+
"Sherweb",
17+
"Autotask",
18+
"Datto",
19+
"Syncro",
20+
"ImmyBot",
21+
"Choco",
22+
],
23+
"ignoreWords": [
24+
"CIPPAPI",
25+
"locationcipp",
26+
"TNEF",
27+
"winmail",
28+
"PSTN",
29+
],
30+
"import": []
31+
}

0 commit comments

Comments
 (0)