-
Notifications
You must be signed in to change notification settings - Fork 127
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
Update .gitignore
and enhance PowerShell Script Analyzer settings.
#273
Open
Sntai20
wants to merge
10
commits into
Development
Choose a base branch
from
personal/ansantan/Code-Quality
base: Development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
244af4f
Update PSScriptAnalyzerSettings with new rules and docs
e42ffc3
Update .gitignore for comprehensive file exclusions
d4dd18e
Merge branch 'Development' into personal/ansantan/Code-Quality
Sntai20 e235d2f
Refactor code for improved readability and consistency (#276)
Sntai20 a3f9d0e
Refactor code for readability and consistency (#277)
Sntai20 f2f9030
Refactor code for readability and consistency, using consistent inden…
Sntai20 aa23e68
Improve code readability by adding braces to functions (#279)
Sntai20 1cbf0d6
Fix casing and improve readability in PowerShell scripts (#280)
Sntai20 08620f9
Refactor null checks for improved readability (#281)
Sntai20 192315b
Exclude non-priority PSScriptAnalyzer rules
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,130 +1,130 @@ | ||
@{ | ||
# Script module or binary module file associated with this manifest | ||
RootModule = 'Hawk.psm1' | ||
|
||
# Version number of this module. | ||
ModuleVersion = '4.0' | ||
|
||
# ID used to uniquely identify this module | ||
GUID = '1f6b6b91-79c4-4edf-83a1-66d2dc8c3d85' | ||
|
||
# Author of this module | ||
Author = 'Paul Navarro, Jonathan Butler, Lorenzo Ireland, Julius Perez' | ||
|
||
# Company or vendor of this module | ||
CompanyName = 'Hawk Forensics' | ||
|
||
# Copyright statement for this module | ||
Copyright = 'Copyright (c) 2025 Paul Navarro' | ||
|
||
# Description of the functionality provided by this module | ||
Description = 'A free, open-source forensics PowerShell module for conducting incident response and threat hunting of Microsoft Cloud environments. Hawk streamlines the collection of forensic data from Microsoft 365 and Entra ID environments to help security professionals, incident responders, and administrators quickly gather critical log data and identify potential security concerns. While it includes basic analysis capabilities to flag items of interest, it focuses on efficient data collection rather than automated detection.' | ||
|
||
# Minimum version of the Windows PowerShell engine required by this module | ||
PowerShellVersion = '5.0' | ||
|
||
# Modules that must be imported into the global environment prior to importing | ||
# this module | ||
RequiredModules = @( | ||
@{ModuleName = 'PSFramework'; ModuleVersion = '1.12.346' }, | ||
@{ModuleName = 'PSAppInsights'; ModuleVersion = '0.9.6' }, | ||
@{ModuleName = 'ExchangeOnlineManagement'; ModuleVersion = '3.0.0' }, | ||
@{ModuleName = 'Microsoft.Graph.Authentication'; ModuleVersion = '2.25.0' }, | ||
@{ModuleName = 'Microsoft.Graph.Identity.DirectoryManagement'; ModuleVersion = '2.25.0' }, | ||
@{ModuleName = 'Microsoft.Graph.Users'; ModuleVersion = '2.25.0' }, | ||
@{ModuleName = 'Microsoft.Graph.Applications'; ModuleVersion = '2.25.0' }, | ||
@{ModuleName = 'Microsoft.Graph.Identity.Signins'; ModuleVersion = '2.25.0' }, | ||
@{ModuleName = 'Microsoft.Graph.Reports'; ModuleVersion = '2.25.0' } | ||
) | ||
|
||
# Assemblies that must be loaded prior to importing this module | ||
RequiredAssemblies = @('bin\System.Net.IPNetwork.dll') | ||
|
||
# Type files (.ps1xml) to be loaded when importing this module | ||
# TypesToProcess = @('xml\Hawk.Types.ps1xml') | ||
|
||
# Format files (.ps1xml) to be loaded when importing this module | ||
# FormatsToProcess = @('xml\Hawk.Format.ps1xml') | ||
|
||
# Functions to export from this module | ||
FunctionsToExport = | ||
'Get-HawkTenantConfiguration', | ||
'Get-HawkTenantEDiscoveryConfiguration', | ||
'Get-HawkTenantConsentGrant', | ||
'Get-HawkTenantRBACChange', | ||
'Get-HawkTenantEntraIDAppAuditLog', | ||
'Get-HawkUserUALSignInLog', | ||
'Get-HawkUserConfiguration', | ||
'Get-HawkUserEmailForwarding', | ||
'Get-HawkUserInboxRule', | ||
'Get-HawkUserMailboxAuditing', | ||
'Search-HawkTenantActivityByIP', | ||
'Get-HawkTenantAdminInboxRuleCreation', | ||
'Get-HawkTenantAdminInboxRuleModification', | ||
'Get-HawkTenantAdminInboxRuleRemoval', | ||
'Get-HawkTenantAdminMailboxPermissionChange', | ||
'Get-HawkTenantAdminEmailForwardingChange', | ||
'Show-HawkHelp', | ||
'Start-HawkTenantInvestigation', | ||
'Start-HawkUserInvestigation', | ||
'Update-HawkModule', | ||
'Get-HawkUserAdminAudit', | ||
'Get-HawkMessageHeader', | ||
'Get-HawkUserPWNCheck', | ||
'Get-HawkUserAutoReply', | ||
'Get-HawkUserMessageTrace', | ||
'Get-HawkUserMobileDevice', | ||
'Get-HawkTenantEntraIDAdmin', | ||
'Get-HawkTenantEXOAdmin', | ||
'Get-HawkUserMailItemsAccessed', | ||
'Get-HawkUserExchangeSearchQuery', | ||
'Get-HawkUserMailSendActivity', | ||
'Get-HawkTenantAppAndSPNCredentialDetail', | ||
'Get-HawkTenantEntraIDUser', | ||
'Get-HawkTenantDomainActivity', | ||
'Get-HawkTenantEDiscoveryLog', | ||
'Get-HawkUserSharePointSearchQuery', | ||
'Get-HawkUserEntraIDSignInLog', | ||
'Get-HawkTenantEntraIDAuditLog', | ||
'Get-HawkTenantRiskyUsers', | ||
'Get-HawkTenantRiskDetections' | ||
# Cmdlets to export from this module | ||
# CmdletsToExport = '' | ||
|
||
# Variables to export from this module | ||
# VariablesToExport = '' | ||
|
||
# Aliases to export from this module | ||
# AliasesToExport = '' | ||
|
||
# List of all modules packaged with this module | ||
ModuleList = @() | ||
|
||
# List of all files packaged with this module | ||
FileList = @() | ||
|
||
# Private data to pass to the module specified in ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. | ||
PrivateData = @{ | ||
|
||
#Support for PowerShellGet galleries. | ||
PSData = @{ | ||
|
||
# Tags applied to this module. These help with module discovery in online galleries. | ||
Tags = @("O365", "Security", "Audit", "Breach", "Investigation", "Exchange", "EXO", "Compliance", "Logon", "M365", "Incident-Response", "Solarigate", "EntraID", "Entra", "Osprey", "Azure", "Forensics", "Office365", "IncidentResponse") | ||
|
||
# A URL to the license for this module. | ||
LicenseUri = 'https://github.com/T0pCyber/hawk/blob/master/LICENSE' | ||
|
||
# A URL to the main website for this project. | ||
ProjectUri = 'https://github.com/T0pCyber/Hawk' | ||
|
||
# A URL to an icon representing this module. | ||
IconUri = 'https://i.ibb.co/XXH4500/Hawk.png' | ||
|
||
# ReleaseNotes of this module | ||
ReleaseNotes = 'https://github.com/T0pCyber/hawk/blob/master/Hawk/changelog.md' | ||
|
||
} # End of PSData hashtable | ||
|
||
} # End of PrivateData hashtable | ||
@{ | ||
# Script module or binary module file associated with this manifest | ||
RootModule = 'Hawk.psm1' | ||
|
||
# Version number of this module. | ||
ModuleVersion = '4.0' | ||
|
||
# ID used to uniquely identify this module | ||
GUID = '1f6b6b91-79c4-4edf-83a1-66d2dc8c3d85' | ||
|
||
# Author of this module | ||
Author = 'Paul Navarro, Jonathan Butler, Lorenzo Ireland, Julius Perez' | ||
|
||
# Company or vendor of this module | ||
CompanyName = 'Hawk Forensics' | ||
|
||
# Copyright statement for this module | ||
Copyright = 'Copyright (c) 2025 Paul Navarro' | ||
|
||
# Description of the functionality provided by this module | ||
Description = 'A free, open-source forensics PowerShell module for conducting incident response and threat hunting of Microsoft Cloud environments. Hawk streamlines the collection of forensic data from Microsoft 365 and Entra ID environments to help security professionals, incident responders, and administrators quickly gather critical log data and identify potential security concerns. While it includes basic analysis capabilities to flag items of interest, it focuses on efficient data collection rather than automated detection.' | ||
|
||
# Minimum version of the Windows PowerShell engine required by this module | ||
PowerShellVersion = '5.0' | ||
|
||
# Modules that must be imported into the global environment prior to importing | ||
# this module | ||
RequiredModules = @( | ||
@{ModuleName = 'PSFramework'; ModuleVersion = '1.12.346' }, | ||
@{ModuleName = 'PSAppInsights'; ModuleVersion = '0.9.6' }, | ||
@{ModuleName = 'ExchangeOnlineManagement'; ModuleVersion = '3.0.0' }, | ||
@{ModuleName = 'Microsoft.Graph.Authentication'; ModuleVersion = '2.25.0' }, | ||
@{ModuleName = 'Microsoft.Graph.Identity.DirectoryManagement'; ModuleVersion = '2.25.0' }, | ||
@{ModuleName = 'Microsoft.Graph.Users'; ModuleVersion = '2.25.0' }, | ||
@{ModuleName = 'Microsoft.Graph.Applications'; ModuleVersion = '2.25.0' }, | ||
@{ModuleName = 'Microsoft.Graph.Identity.Signins'; ModuleVersion = '2.25.0' }, | ||
@{ModuleName = 'Microsoft.Graph.Reports'; ModuleVersion = '2.25.0' } | ||
) | ||
|
||
# Assemblies that must be loaded prior to importing this module | ||
RequiredAssemblies = @('bin\System.Net.IPNetwork.dll') | ||
|
||
# Type files (.ps1xml) to be loaded when importing this module | ||
# TypesToProcess = @('xml\Hawk.Types.ps1xml') | ||
|
||
# Format files (.ps1xml) to be loaded when importing this module | ||
# FormatsToProcess = @('xml\Hawk.Format.ps1xml') | ||
|
||
# Functions to export from this module | ||
FunctionsToExport = | ||
'Get-HawkTenantConfiguration', | ||
'Get-HawkTenantEDiscoveryConfiguration', | ||
'Get-HawkTenantConsentGrant', | ||
'Get-HawkTenantRBACChange', | ||
'Get-HawkTenantEntraIDAppAuditLog', | ||
'Get-HawkUserUALSignInLog', | ||
'Get-HawkUserConfiguration', | ||
'Get-HawkUserEmailForwarding', | ||
'Get-HawkUserInboxRule', | ||
'Get-HawkUserMailboxAuditing', | ||
'Search-HawkTenantActivityByIP', | ||
'Get-HawkTenantAdminInboxRuleCreation', | ||
'Get-HawkTenantAdminInboxRuleModification', | ||
'Get-HawkTenantAdminInboxRuleRemoval', | ||
'Get-HawkTenantAdminMailboxPermissionChange', | ||
'Get-HawkTenantAdminEmailForwardingChange', | ||
'Show-HawkHelp', | ||
'Start-HawkTenantInvestigation', | ||
'Start-HawkUserInvestigation', | ||
'Update-HawkModule', | ||
'Get-HawkUserAdminAudit', | ||
'Get-HawkMessageHeader', | ||
'Get-HawkUserPWNCheck', | ||
'Get-HawkUserAutoReply', | ||
'Get-HawkUserMessageTrace', | ||
'Get-HawkUserMobileDevice', | ||
'Get-HawkTenantEntraIDAdmin', | ||
'Get-HawkTenantEXOAdmin', | ||
'Get-HawkUserMailItemsAccessed', | ||
'Get-HawkUserExchangeSearchQuery', | ||
'Get-HawkUserMailSendActivity', | ||
'Get-HawkTenantAppAndSPNCredentialDetail', | ||
'Get-HawkTenantEntraIDUser', | ||
'Get-HawkTenantDomainActivity', | ||
'Get-HawkTenantEDiscoveryLog', | ||
'Get-HawkUserSharePointSearchQuery', | ||
'Get-HawkUserEntraIDSignInLog', | ||
'Get-HawkTenantEntraIDAuditLog', | ||
'Get-HawkTenantRiskyUsers', | ||
'Get-HawkTenantRiskDetections' | ||
# Cmdlets to export from this module | ||
# CmdletsToExport = '' | ||
|
||
# Variables to export from this module | ||
# VariablesToExport = '' | ||
|
||
# Aliases to export from this module | ||
# AliasesToExport = '' | ||
|
||
# List of all modules packaged with this module | ||
ModuleList = @() | ||
|
||
# List of all files packaged with this module | ||
FileList = @() | ||
|
||
# Private data to pass to the module specified in ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. | ||
PrivateData = @{ | ||
|
||
#Support for PowerShellGet galleries. | ||
PSData = @{ | ||
|
||
# Tags applied to this module. These help with module discovery in online galleries. | ||
Tags = @("O365", "Security", "Audit", "Breach", "Investigation", "Exchange", "EXO", "Compliance", "Logon", "M365", "Incident-Response", "Solarigate", "EntraID", "Entra", "Osprey", "Azure", "Forensics", "Office365", "IncidentResponse") | ||
|
||
# A URL to the license for this module. | ||
LicenseUri = 'https://github.com/T0pCyber/hawk/blob/master/LICENSE' | ||
|
||
# A URL to the main website for this project. | ||
ProjectUri = 'https://github.com/T0pCyber/Hawk' | ||
|
||
# A URL to an icon representing this module. | ||
IconUri = 'https://i.ibb.co/XXH4500/Hawk.png' | ||
|
||
# ReleaseNotes of this module | ||
ReleaseNotes = 'https://github.com/T0pCyber/hawk/blob/master/Hawk/changelog.md' | ||
|
||
} # End of PSData hashtable | ||
|
||
} # End of PrivateData hashtable | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# This is where the strings go, that are written by | ||
# Write-PSFMessage, Stop-PSFFunction or the PSFramework validation scriptblocks | ||
@{ | ||
'key' = 'Value' | ||
'key' = 'Value' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a standard .gitignore file commonly used for repositories the use Visual Studio Code or Visual Studio.
Ignore Visual Studio temporary files, build results, and files generated by popular Visual Studio add-ons.
Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore