Skip to content

Commit

Permalink
Added custom tests
Browse files Browse the repository at this point in the history
  • Loading branch information
merill committed Apr 4, 2024
1 parent 53261d7 commit 814a6c6
Show file tree
Hide file tree
Showing 8 changed files with 409 additions and 299 deletions.
24 changes: 24 additions & 0 deletions tests/Custom/Custom.Tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Describe "ContosoConfig" -Tag "Privilege" {
It "Check approved Global Admins" {

# Approved list of Global Admins
$approvedGlobalAdmins = @("[email protected]", "[email protected]")

# Get all Global Admins
$roleId = (Get-MgDirectoryRole -Filter "DisplayName eq 'Global Administrator'").Id
$globalAdmins = Get-MgDirectoryRoleMember -DirectoryRoleId $roleId
$globalAdmins = $globalAdmins.AdditionalProperties.userPrincipalName

# Check if the Global Admins are approved
$globalAdmins | Should -BeIn $approvedGlobalAdmins
}
}









583 changes: 296 additions & 287 deletions website/package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "^3.1.1",
"@docusaurus/preset-classic": "^3.1.1",
"@docusaurus/theme-mermaid": "^3.1.1",
"@docusaurus/core": "^3.2.0",
"@docusaurus/preset-classic": "^3.2.0",
"@docusaurus/theme-mermaid": "^3.2.0",
"@easyops-cn/docusaurus-search-local": "^0.40.1",
"@fortawesome/fontawesome-svg-core": "^6.5.1",
"@fortawesome/free-brands-svg-icons": "^6.5.1",
Expand All @@ -30,7 +30,7 @@
"react-dom": "^18.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.1.1",
"@docusaurus/module-type-aliases": "^3.2.0",
"@docusaurus/types": "^3.1.1"
},
"browserslist": {
Expand Down
7 changes: 5 additions & 2 deletions website/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,8 @@ img.rounded-corners {
}

/* Cross Platform */

.CrossPlatform {
img {
max-width: 500px;
margin: -20px 0;

text {
Expand All @@ -134,6 +132,11 @@ img.rounded-corners {
}
}

.FeatureImageLeft {
max-width: 550px;
margin: -20px -60px !important;
}

.RightText {
padding-left: 40px;
}
Expand Down
86 changes: 80 additions & 6 deletions website/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,24 @@ import Heading from "@theme/Heading";
import styles from "./index.module.css";

const textContent = {

customTests: `
Write Pester tests that encode your organization's business and security policies.<br/><br/>
<strong>Apply modern DevSecOps practices</strong> and continously monitor critical aspects of your Microsoft cloud.
`,

maesterReport: `
Get a quick snapshot of your tenant's health with the report generated by Maester.<br/><br/>
Get a quick snapshot of your tenant's security posture with the report generated by Maester.<br/><br/>
<strong>The interactive click-through</strong> report let's you drill down to the details of
each test.
<br/><br/>`,
quickFix: `
Test details include direct links to the admins portals.<br/><br/>
<strong>Jump straight</strong> into the conditional access policy that needs to be fixed or the group that needs to be reviewed.
<br/><br/>`,
eidsca: `
Maester includes over 40+ out of the box tests from <a href="/docs/tests/eidsca/">Entra ID Security Config Analyzer (EIDSCA).</a><br/><br/>
EIDSCA is a part of the <strong>Microsoft Entra ID - Attack and Defense Playbook</strong> and is a collection of common attack scenarios on Microsoft Entra ID and how they can be mitigated.
<br/><br/>`,
emailAlert: `
Set up email alerts to be delivered to your inbox with a
Expand Down Expand Up @@ -166,9 +180,28 @@ function TwoColumns({ columnOne, columnTwo, reverse }) {
);
}

function MaesterReport() {
function CustomTests() {
return (
<Section className="CrossPlatform" background="tint">
<TwoColumns
reverse
columnOne={
<TextColumn title="Security as Code (SaC)" text={textContent.customTests} />
}
columnTwo={
<img className="FeatureImageLeft"
alt="Code snippet for a custom test"
src="img/home/custom-test.png"
/>
}
/>
</Section>
);
}

function MaesterReport() {
return (
<Section className="CrossPlatform" >
<TwoColumns
columnOne={
<TextColumn
Expand All @@ -189,7 +222,7 @@ function MaesterReport() {

function GitHub() {
return (
<Section className="CrossPlatform LeftImage">
<Section className="CrossPlatform LeftImage" background="tint">
<TwoColumns
reverse
columnOne={
Expand All @@ -205,11 +238,11 @@ function GitHub() {

function AzureDevOps() {
return (
<Section className="CrossPlatform" background="tint">
<Section className="CrossPlatform">
<TwoColumns
columnOne={
<TextColumn
title="Maester 💙 Azure DevOps"
title="Maester 💛 Azure DevOps"
text={textContent.azureDevOps}
/>
}
Expand All @@ -226,7 +259,7 @@ function AzureDevOps() {

function EmailAlert() {
return (
<Section className="CrossPlatform">
<Section className="CrossPlatform" background="tint">
<TwoColumns
reverse
columnOne={
Expand All @@ -243,6 +276,44 @@ function EmailAlert() {
);
}

function Eidsca() {
return (
<Section className="CrossPlatform">
<TwoColumns

columnOne={
<TextColumn title="40+ EIDSCA Tests" text={textContent.eidsca} />
}
columnTwo={
<img
alt="Screenshot of an EIDSCA test result"
src="img/home/maester-report-eidsca.png"
/>
}
/>
</Section>
);
}

function QuickRemediation() {
return (
<Section className="CrossPlatform" background="tint">
<TwoColumns
reverse
columnOne={
<TextColumn title="Quick remediation" text={textContent.quickFix} />
}
columnTwo={
<img
alt="Screenshot of an EIDSCA test result"
src="img/home/maester-report-detail.png"
/>
}
/>
</Section>
);
}

export default function Home() {
const { siteConfig } = useDocusaurusContext();
return (
Expand All @@ -254,7 +325,10 @@ export default function Home() {
<main>
<HomepageFeatures />
</main>
<CustomTests />
<MaesterReport />
<QuickRemediation />
<Eidsca />
<GitHub />
<AzureDevOps />
<EmailAlert />
Expand Down
Binary file added website/static/img/home/custom-test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 814a6c6

Please sign in to comment.