Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Microsoft Secure Score to OHDF #6007

Merged
merged 79 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from 76 commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
dfdd047
draft of the microsoftSecureScore converter
meme112233 Jul 17, 2024
2621d63
bugfix: reading of secureScoreProfiles doc needed field for the array
meme112233 Jul 17, 2024
6bb8070
minor update map/filter
meme112233 Jul 17, 2024
da00d81
add threats to tags from profile matching controlScore
meme112233 Jul 18, 2024
074dd7a
add testing and update status check to use scoreInPercentage
meme112233 Jul 18, 2024
f9dd52f
update testing and fingerprinting
meme112233 Jul 18, 2024
3f12007
update fingerprinting for accept combined msftSecureScore document vi…
meme112233 Jul 18, 2024
1a18d6b
lint fix
meme112233 Jul 18, 2024
86592ed
msft-config-mapper-2.ts renamed without 2, cleanup commented out code
meme112233 Jul 18, 2024
62878a3
code cleanup. delete unused code
meme112233 Jul 18, 2024
cca15a3
tslint allow commented out code in test suite
meme112233 Jul 18, 2024
efb1109
revert jest version bump
meme112233 Jul 19, 2024
f96258e
revert package.json to minimal requirements being added (only typing …
meme112233 Jul 19, 2024
7842362
rename mapper for consistency. msft_secure_score_mapper
meme112233 Jul 19, 2024
7cad9c8
update test name and remove linting inline disble block for commented…
meme112233 Jul 19, 2024
a88392e
rename files for org per PR comments
meme112233 Jul 19, 2024
387fbf3
update tags. fix array of array issue. add tiers,services,userImpact …
meme112233 Jul 19, 2024
23b1171
bugfix: replace missed exports due to rename to MsftSecureScoreMapper
meme112233 Jul 19, 2024
353519e
bugfix/ typo
meme112233 Jul 22, 2024
8a003c8
console debugging
meme112233 Jul 22, 2024
f4f5120
Revert "console debugging"
meme112233 Jul 22, 2024
59bf07b
Passthrough fix; minor styling changes
charleshu-8 Jul 22, 2024
6b1b3e2
Merge branch 'master' into meme-working
charleshu-8 Jul 22, 2024
bb32263
actual sample msft secureScore.json test doc updated to have value: []
meme112233 Jul 22, 2024
97e9610
bugfix/populate code with control data and optionally profiles data
meme112233 Jul 22, 2024
5a3ab7a
Update libs/hdf-converters/src/msft-secure-score-mapper.ts
meme112233 Jul 22, 2024
946412b
remove 'summary' field as no value available
meme112233 Jul 22, 2024
ca595c8
Update libs/hdf-converters/src/msft-secure-score-mapper.ts
meme112233 Jul 22, 2024
be4b3a0
improve names of parameters in arrow functions
meme112233 Jul 22, 2024
7a1ea4a
Update libs/hdf-converters/src/msft-secure-score-mapper.ts
meme112233 Jul 22, 2024
8f7133b
remove unuded profile.version field as no value known from Microsoft
meme112233 Jul 22, 2024
a720dc4
code cleanup. remove unused import
meme112233 Jul 22, 2024
767e30f
lint and update test expected results
meme112233 Jul 22, 2024
96e0ea6
update test data
meme112233 Jul 22, 2024
7a270f0
Missed argument name change
charleshu-8 Jul 23, 2024
53a2ace
Linting
charleshu-8 Jul 23, 2024
363cc2f
implementationStatus -> controls.results.code_desc, remediation -> de…
meme112233 Jul 23, 2024
01c0a83
update test data for changes to mapper
meme112233 Jul 23, 2024
4995960
Update msft-secure-score-mapper.ts
ejaronne Jul 24, 2024
c78d45c
Merge pull request #6019 from mitre/secureScore_nist_default
meme112233 Jul 24, 2024
12c442c
lint fix and update test data
meme112233 Jul 24, 2024
e1cfe87
relocate NIST to be in tags
meme112233 Jul 24, 2024
3d7bec6
sort exports per PR comment
meme112233 Jul 29, 2024
4510d36
add Msft_Secure_mapper to supported formats README.md
meme112233 Jul 29, 2024
c979383
typo fixed
meme112233 Jul 29, 2024
3dba0d7
add run_time to mapper. required for downstream transformations that …
meme112233 Jul 30, 2024
44dfdf6
update delimeter on control title from ... to \n
meme112233 Aug 1, 2024
933fd37
rename tag: group->category in dederence to msft naming
meme112233 Aug 5, 2024
d5078b7
utilize lodash.uniq for tag.threats[]
meme112233 Aug 5, 2024
7225794
add profiles[].remediationImpact as descriptions[label:rationale]
meme112233 Aug 5, 2024
f8c5062
add secure score to FileReader.vue
meme112233 Aug 5, 2024
af1c4a3
merge from master
meme112233 Aug 5, 2024
9d8e43d
update merge of records by id/cat
meme112233 Aug 5, 2024
be3747b
fix rawdata passthrough
meme112233 Aug 5, 2024
4c07e73
update profiles.title include runID
meme112233 Aug 5, 2024
fb8203f
handle output readability better
meme112233 Aug 5, 2024
15c96a3
track secureScoreControlProfile.rank as control.tag.rank
meme112233 Aug 5, 2024
daa958a
remove run_time
meme112233 Aug 5, 2024
636d739
cleanup inports
meme112233 Aug 5, 2024
309b657
lint fix
meme112233 Aug 5, 2024
d228148
conditional includsion of tags
meme112233 Aug 5, 2024
13afed3
secureScoreResults used to output full OHDF report per secureScore re…
meme112233 Aug 6, 2024
185aa41
bugfix/ exports from msft-secure-score-mapper fixed
meme112233 Aug 6, 2024
98242f0
update exports msftSecureMapper
meme112233 Aug 6, 2024
9668cdc
export MsftSecureScoreMapper
meme112233 Aug 6, 2024
a8f4e55
Merge branch 'master' into meme-working
meme112233 Aug 6, 2024
ab6113e
add unmapped fields as tags or passthrough data
meme112233 Aug 6, 2024
0ddff07
update MsftSecureScoreResult type hints
meme112233 Aug 6, 2024
83ce9c1
update MsftSecureScoreResult type hints
meme112233 Aug 6, 2024
163ff01
add withRaw parameter to msft secure score results
meme112233 Aug 6, 2024
529ebcf
use utils.global constants for default NIST tags
meme112233 Aug 6, 2024
f18fd5d
remove duplicate tag 'rank'
meme112233 Aug 6, 2024
438dee0
convert forEach to for ... of
meme112233 Aug 6, 2024
68ead45
convert forEach to map(..)
meme112233 Aug 6, 2024
d8e142a
delete extra copy of combined_msft.json
meme112233 Aug 6, 2024
b7b8080
lint fix
meme112233 Aug 6, 2024
58357f7
private keyword isn't that useful
Amndeep7 Aug 7, 2024
710cdf4
memoized the getProfiles function so that the repeated calls to the f…
Amndeep7 Aug 7, 2024
3537d98
Merge branch 'master' into meme-working
Amndeep7 Aug 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<li>Golang Security Checker (gosec)</li>
<li>Ion Channel</li>
<li>JFrog Xray</li>
<li>Microsoft Secure Score</li>
<li>Nessus</li>
<li>Netsparker</li>
<li>Nikto</li>
Expand Down
3 changes: 3 additions & 0 deletions apps/frontend/src/store/report_intake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
INPUT_TYPES,
IonChannelMapper,
JfrogXrayMapper,
MsftSecureScoreResults,
NessusResults,
NetsparkerMapper,
NiktoMapper,
Expand Down Expand Up @@ -230,6 +231,8 @@ export class InspecIntake extends VuexModule {
switch (typeGuess) {
case INPUT_TYPES.JFROG:
return new JfrogXrayMapper(convertOptions.data).toHdf();
case INPUT_TYPES.MSFT_SEC_SCORE:
return new MsftSecureScoreResults(convertOptions.data).toHdf();
case INPUT_TYPES.ASFF:
return Object.values(
new ASFFResultsMapper(convertOptions.data).toHdf()
Expand Down
29 changes: 15 additions & 14 deletions libs/hdf-converters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,21 @@ OHDF Converters supplies several methods to convert various types of security to
9. [**gosec-mapper**] - gosec results JSON file
10. [**ionchannel-mapper**] - SBOM data from Ion Channel
11. [**jfrog-xray-mapper**] - JFrog Xray results JSON file
12. [**nessus-mapper**] - Nessus XML results file
13. [**netsparker-mapper**] - Netsparker XML results file
14. [**nikto-mapper**] - Nikto results JSON file
15. [**prisma-mapper**] - Prisma Cloud Scan Report CSV file
16. [**sarif-mapper**] - SARIF JSON file
17. [**scoutsuite-mapper**] - ScoutSuite results from a Javascript object
18. [**snyk-mapper**] - Snyk results JSON file
19. [**sonarqube-mapper**] - SonarQube vulnerabilities for the specified project name and optional branch or pull/merge request ID name from an API
20. [**splunk-mapper**] - Splunk instance
21. [**trufflehog-mapper**] - Trufflehog results json file
22. [**twistlock-mapper**] - Twistlock CLI output file
23. [**veracode-mapper**] - Veracode Scan Results XML file
24. [**xccdf-results-mapper**] - SCAP client XCCDF-Results XML report
25. [**zap-mapper**] - OWASP ZAP results JSON
12. [**msft-secure-mapper**] - Microsoft Secure Score results file
13. [**nessus-mapper**] - Nessus XML results file
14. [**netsparker-mapper**] - Netsparker XML results file
15. [**nikto-mapper**] - Nikto results JSON file
16. [**prisma-mapper**] - Prisma Cloud Scan Report CSV file
17. [**sarif-mapper**] - SARIF JSON file
18. [**scoutsuite-mapper**] - ScoutSuite results from a Javascript object
19. [**snyk-mapper**] - Snyk results JSON file
20. [**sonarqube-mapper**] - SonarQube vulnerabilities for the specified project name and optional branch or pull/merge request ID name from an API
21. [**splunk-mapper**] - Splunk instance
22. [**trufflehog-mapper**] - Trufflehog results json file
23. [**twistlock-mapper**] - Twistlock CLI output file
24. [**veracode-mapper**] - Veracode Scan Results XML file
25. [**xccdf-results-mapper**] - SCAP client XCCDF-Results XML report
26. [**zap-mapper**] - OWASP ZAP results JSON

### NOTICE

Expand Down
1 change: 1 addition & 0 deletions libs/hdf-converters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export * as NiktoNistMappingData from './src/mappings/NiktoNistMappingData';
export * as NistCciMappingData from './src/mappings/NistCciMappingData';
export * as OWaspNistMappingData from './src/mappings/OWaspNistMappingData';
export * as ScoutsuiteNistMappingData from './src/mappings/ScoutsuiteNistMappingData';
export * from './src/msft-secure-score-mapper';
export * from './src/nessus-mapper';
export * from './src/netsparker-mapper';
export * from './src/nikto-mapper';
Expand Down
1 change: 1 addition & 0 deletions libs/hdf-converters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"xml2json": "tsx data/converters/xml2json.ts"
},
"dependencies": {
"@microsoft/microsoft-graph-types": "^2.40.0",
"@aws-sdk/client-config-service": "^3.95.0",
"@e965/xlsx": "^0.20.0",
"@mdi/js": "^7.0.96",
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#security/secureScores",
"value": [
{
"id": "12345678-1234-1234-1234-1234567890abcd_2024-01-01",
"azureTenantId": "12345678-1234-1234-1234-1234567890abcd",
"activeUserCount": 1,
"createdDateTime": "2024-01-01T00:00:00Z",
"currentScore": 128,
"enabledServices": [
"HasOCAS",
"HasCLB",
"HasMDOP1",
"HasMDOP2",
"HasEXOP2",
"HasSPOP2",
"HasAADFree"
],
"licensedUserCount": 100,
"maxScore": 1000,
"vendorInformation": {
"provider": "SecureScore",
"providerVersion": null,
"subProvider": null,
"vendor": "Microsoft"
},
"averageComparativeScores": [
{
"basis": "AllTenants",
"averageScore": 54.65,
"appsScore": 29.65,
"appsScoreMax": 79,
"dataScore": 0.46,
"dataScoreMax": 3.27,
"deviceScore": 9.13,
"deviceScoreMax": 16.76,
"identityScore": 36.02,
"identityScoreMax": 59.42,
"infrastructureScore": 0,
"infrastructureScoreMax": 0
},
{
"basis": "TotalSeats",
"averageScore": 48.98,
"SeatSizeRangeLowerValue": "1",
"SeatSizeRangeUpperValue": "100",
"appsScore": 34.15,
"appsScoreMax": 94.46,
"dataScore": 0.5,
"dataScoreMax": 3.97,
"deviceScore": 6.87,
"deviceScoreMax": 12.65,
"identityScore": 34.16,
"identityScoreMax": 59.5,
"infrastructureScore": 0,
"infrastructureScoreMax": 0
}
],
"controlScores": [
{
"controlCategory": "Apps",
"controlName": "spo_idle_session_timeout",
"description": "\n\t\t\tIdle session sign-out lets you specify a time at which users are warned and are later signed out of Microsoft 365 after a period of browser inactivity in SharePoint and OneDrive.\n <br/>\n\t\t\tThis policy is one of several you can use with SharePoint and OneDrive to balance security and user productivity and help keep your data safe, regardless of where users access the data from, what device they're working on, and how secure their network connection is.\n\t\t",
"score": 0,
"lastSynced": "2024-01-01T17:12:14Z",
"implementationStatus": "The setting is not compliant.",
"on": "false",
"scoreInPercentage": 0
},
{
"controlCategory": "Apps",
"controlName": "spo_legacy_auth",
"description": "\n\t\t\tModern authentication in Microsoft 365 enables authentication features like multifactor authentication (MFA) using smart cards, certificate-based authentication (CBA), and third-party SAML identity providers.\n\t\t\t<br/>\n\t\t\tStrong authentication controls, such as the use of multifactor authentication, may be circumvented if basic authentication is used by SharePoint applications. Requiring modern authentication for SharePoint applications ensures strong authentication mechanisms are used when establishing sessions between these applications, SharePoint, and connecting users.\n\t\t\t<br/>\n\t\t\t<i>This information was taken from Center for Internet Security (CIS).</i>\n\t\t",
"score": 0,
"lastSynced": "2024-01-01T17:12:14Z",
"implementationStatus": "The setting is not compliant.",
"on": "false",
"scoreInPercentage": 0
}
]
},
{
"id": "12345678-1234-1234-1234-1234567890abcd_2024-01-02",
"azureTenantId": "12345678-1234-1234-1234-1234567890abcd",
"activeUserCount": 1,
"createdDateTime": "2024-01-01T00:00:00Z",
"currentScore": 128,
"enabledServices": [
"HasOCAS",
"HasCLB",
"HasMDOP1",
"HasMDOP2",
"HasEXOP2",
"HasSPOP2",
"HasAADFree"
],
"licensedUserCount": 0,
"maxScore": 274,
"vendorInformation": {
"provider": "SecureScore",
"providerVersion": null,
"subProvider": null,
"vendor": "Microsoft"
},
"averageComparativeScores": [
{
"basis": "AllTenants",
"averageScore": 54.65,
"appsScore": 29.65,
"appsScoreMax": 79,
"dataScore": 0.46,
"dataScoreMax": 3.27,
"deviceScore": 9.13,
"deviceScoreMax": 16.76,
"identityScore": 36.02,
"identityScoreMax": 59.42,
"infrastructureScore": 0,
"infrastructureScoreMax": 0
},
{
"basis": "TotalSeats",
"averageScore": 48.98,
"SeatSizeRangeLowerValue": "1",
"SeatSizeRangeUpperValue": "100",
"appsScore": 34.15,
"appsScoreMax": 94.46,
"dataScore": 0.5,
"dataScoreMax": 3.97,
"deviceScore": 6.87,
"deviceScoreMax": 12.65,
"identityScore": 34.16,
"identityScoreMax": 59.5,
"infrastructureScore": 0,
"infrastructureScoreMax": 0
}
],
"controlScores": [
{
"controlCategory": "Apps",
"controlName": "McasFirewallLogUpload",
"description": "Log collectors provide visibility into cloud app usage so you can identify if there are any apps that run without official approval, or if there is anomalous behavior. Log collectors automatically upload reports and parse the firewall/ proxy traffic logs to see if there is a match with your services in the Cloud App Catalog.",
"score": 0,
"lastSynced": "2024-01-01T04:34:13Z",
"implementationStatus": "Feature in place: false.",
"on": "false",
"scoreInPercentage": 0
},
{
"controlCategory": "Apps",
"controlName": "McasCutomActivityPolicy",
"description": "Activity policies help you monitor specific activities carried out by users, or follow unexpectedly high rates of certain types of activities. After you set an activity detection policy, it starts to generate alerts. Alerts are only generated on activities that occur after you create the policy.",
"score": 0,
"lastSynced": "2024-01-01T04:34:13Z",
"implementationStatus": "Policy in place: false.",
"on": "false",
"scoreInPercentage": 0
}
]
}
]
}
Loading
Loading