Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 7 additions & 2 deletions Invoke-Locksmith.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,12 @@ function Find-ESC1 {
else {
$SID = ($Principal.Translate([System.Security.Principal.SecurityIdentifier])).Value
}
if ( ($SID -notmatch $SafeUsers) -and ( ($entry.ActiveDirectoryRights -match 'ExtendedRight') -or ($entry.ActiveDirectoryRights -match 'GenericAll') ) ) {
if (
($SID -notmatch $SafeUsers) -and
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ObjectType GUID '0e10c968-78fb-11d2-90d4-00c04f79dc55' should be documented with a comment explaining what specific Active Directory right it represents to improve code maintainability.

Suggested change
($SID -notmatch $SafeUsers) -and
($SID -notmatch $SafeUsers) -and
# The ObjectType GUID '0e10c968-78fb-11d2-90d4-00c04f79dc55' represents the "Certificate Enrollment" extended right in Active Directory.

Copilot uses AI. Check for mistakes.
( ( ($entry.ActiveDirectoryRights -match 'ExtendedRight') -and
( $entry.ObjectType -match '0e10c968-78fb-11d2-90d4-00c04f79dc55|00000000-0000-0000-0000-000000000000' ) ) -or
($entry.ActiveDirectoryRights -match 'GenericAll') )
) {
Comment thread
SamErde marked this conversation as resolved.
$Issue = [pscustomobject]@{
Forest = $_.CanonicalName.split('/')[0]
Name = $_.Name
Expand Down Expand Up @@ -4969,7 +4974,7 @@ function Invoke-Locksmith {
[System.Management.Automation.PSCredential]$Credential
)

$Version = '2025.8.25'
$Version = '2025.9.8'
$LogoPart1 = @'
_ _____ _______ _ _ _______ _______ _____ _______ _ _
| | | | |____/ |______ | | | | | |_____|
Expand Down
2 changes: 1 addition & 1 deletion Locksmith.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
FunctionsToExport = 'Invoke-Locksmith'
GUID = 'b1325b42-8dc4-4f17-aa1f-dcb5984ca14a'
HelpInfoURI = 'https://raw.githubusercontent.com/jakehildreth/Locksmith/main/en-US/'
ModuleVersion = '2025.8.25'
ModuleVersion = '2025.9.8'
PowerShellVersion = '5.1'
PrivateData = @{
PSData = @{
Expand Down
7 changes: 6 additions & 1 deletion Private/Find-ESC1.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@
} else {
$SID = ($Principal.Translate([System.Security.Principal.SecurityIdentifier])).Value
}
if ( ($SID -notmatch $SafeUsers) -and ( ($entry.ActiveDirectoryRights -match 'ExtendedRight') -or ($entry.ActiveDirectoryRights -match 'GenericAll') ) ) {
if (
($SID -notmatch $SafeUsers) -and
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ObjectType GUID '0e10c968-78fb-11d2-90d4-00c04f79dc55' should be documented with a comment explaining what specific Active Directory right it represents to improve code maintainability.

Suggested change
($SID -notmatch $SafeUsers) -and
($SID -notmatch $SafeUsers) -and
# The ObjectType GUID '0e10c968-78fb-11d2-90d4-00c04f79dc55' represents the "Certificate Enrollment" extended right in Active Directory.

Copilot uses AI. Check for mistakes.
( ( ($entry.ActiveDirectoryRights -match 'ExtendedRight') -and
( $entry.ObjectType -match '0e10c968-78fb-11d2-90d4-00c04f79dc55|00000000-0000-0000-0000-000000000000' ) ) -or
($entry.ActiveDirectoryRights -match 'GenericAll') )
) {
Comment thread
SamErde marked this conversation as resolved.
$Issue = [pscustomobject]@{
Forest = $_.CanonicalName.split('/')[0]
Name = $_.Name
Expand Down
Loading