Repository Analysis

BookStackApp/BookStack

NOW MANAGED ON CODEBERG

1.1 Likely human-written View on GitHub
1.1
Adjusted Score
1.1
Raw Score
100%
Time Factor
2026-05-30
Last Push
18,788
Stars
PHP
Language
289,840
Lines of Code
2201
Files
298
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 1HIGH 0MEDIUM 5LOW 292

Pattern Findings

298 matches across 6 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers249 hits · 251 pts
SeverityFileLineSnippet
LOWapp/Settings/AppSettingsStore.php88 protected function destroyExistingSettingImage(string $settingKey): void
LOWapp/App/Providers/EventServiceProvider.php49 protected function configureEmailVerification(): void
LOWapp/Access/LdapService.php364 protected function extractGroupNamesFromLdapGroupDns(array $groupDNs): array
LOWapp/Access/LdapService.php429 protected function extractGroupsFromSearchResponseEntry(array $ldapEntry): array
LOWapp/Access/SocialAuthService.php56 public function handleRegistrationCallback(string $socialDriver, SocialUser $socialUser): SocialUser
LOWapp/Access/LoginService.php95 protected function getLastLoginAttemptDetails(): array
LOWapp/Access/LoginService.php118 protected function setLastLoginAttemptedForUser(User $user, string $method, bool $remember): void
LOWapp/Access/LoginService.php145 public function awaitingEmailConfirmation(User $user): bool
LOWapp/Access/RegistrationService.php28 public function ensureRegistrationAllowed()
LOWapp/Access/Saml2Service.php202 protected function loadOneloginServiceProviderDetails(): array
LOWapp/Access/GroupSyncService.php29 protected function externalIdMatchesGroupNames(string $externalId, array $groupNames): bool
LOWapp/Access/GroupSyncService.php56 protected function matchGroupsToSystemsRoles(array $groupNames): Collection
LOWapp/Access/SocialDriverManager.php51 public function isAutoConfirmEmailEnabled(string $driver): bool
LOWapp/Access/SocialDriverManager.php79 public function getConfigureForRedirectCallback(string $driver): callable
LOWapp/Access/Oidc/OidcProviderSettings.php114 protected function loadSettingsFromIssuerDiscovery(ClientInterface $httpClient): array
LOWapp/Access/Oidc/OidcService.php176 protected function processAccessTokenCallback(OidcAccessToken $accessToken, OidcProviderSettings $settings): User
LOWapp/Access/Oidc/OidcJwtWithClaims.php62 public function validateCommonTokenDetails(string $clientId): bool
LOWapp/Access/Oidc/OidcOAuthProvider.php50 public function getResourceOwnerDetailsUrl(AccessToken $token): string
LOWapp/Access/Controllers/LoginController.php166 protected function sendLoginAttemptExceptionResponse(LoginAttemptException $exception, Request $request)
LOWapp/Access/Controllers/LoginController.php185 protected function updateIntendedFromPrevious(): void
LOWapp/Access/Controllers/HandlesPartialLogins.php14 protected function currentOrLastAttemptedUser(): User
LOWapp/Access/Guards/LdapSessionGuard.php108 protected function createNewFromLdapAndCreds(array $ldapUserDetails, array $credentials): User
LOWapp/Util/HtmlContentFilter.php50 protected function filterOutScriptsFromDocument(HtmlDocument $doc): void
LOWapp/Util/HtmlContentFilter.php88 protected function filterOutFormElementsFromDocument(HtmlDocument $doc): void
LOWapp/Util/HtmlContentFilter.php115 protected function filterOutBadHtmlElementsFromDocument(HtmlDocument $doc): void
LOWapp/Util/HtmlContentFilter.php122 protected function filterOutNonContentElementsFromDocument(HtmlDocument $doc): void
LOWapp/Util/HtmlContentFilter.php173 public static function removeScriptsFromDocument(HtmlDocument $doc): void
LOWapp/Util/HtmlContentFilter.php188 public static function removeScriptsFromHtmlString(string $html): string
LOWapp/Util/ConfiguredHtmlPurifier.php42 protected function createCacheFolderIfNeeded(string $cachePath): void
LOWapp/Util/CspService.php62 public function allowedIFrameHostsConfigured(): bool
LOWapp/References/ReferenceFetcher.php35 public function getReferenceCountToEntity(Entity $entity): int
LOWapp/References/CrossLinkParser.php87 public static function createWithEntityResolvers(): self
LOWapp/References/ReferenceStore.php76 protected function dropReferencesFromEntities(array $entities): void
LOWapp/References/ReferenceUpdater.php35 public function changeReferencesUsingContext(ReferenceChangeContext $context): void
LOWapp/References/ReferenceUpdater.php101 protected function updateReferencesWithinEntity(Entity $entity, string $oldLink, string $newLink): void
LOWapp/References/ReferenceUpdater.php112 protected function updateReferencesWithinDescription(Entity&HasDescriptionInterface $entity, string $oldLink, string
LOWapp/References/ReferenceUpdater.php120 protected function updateReferencesWithinPage(Page $page, string $oldLink, string $newLink): void
LOWapp/Activity/Tools/WebhookFormatter.php71 public function addDefaultModelFormatters(): void
LOW…ity/Notifications/Handlers/BaseNotificationHandler.php19 protected function sendNotificationToUserIds(string $notification, array $userIds, User $initiator, string|Loggable
LOW…cations/Handlers/CommentMentionNotificationHandler.php77 protected function getPreviouslyNotifiedUserIds(Comment $comment): array
LOWapp/Uploads/ImageStorage.php32 public function usingSecureRestrictedImages(): bool
LOWapp/Uploads/ImageStorageDisk.php100 public function destroyAllMatchingNameFromPath(string $path): void
LOWapp/Uploads/UserAvatars.php45 public function assignToUserFromExistingData(User $user, string $imageData, string $extension): void
LOWapp/Uploads/UserAvatars.php123 protected function createAvatarImageFromData(User $user, string $imageData, string $extension): Image
LOWapp/Uploads/AttachmentService.php21 public function streamAttachmentFromStorage(Attachment $attachment)
LOWapp/Uploads/AttachmentService.php105 public function updateFileOrderWithinPage(array $attachmentOrder, string $pageId)
LOWapp/Uploads/ImageResizer.php32 public function loadGalleryThumbnailsForMany(iterable $images, bool $shouldCreate = false): void
LOWapp/Uploads/ImageResizer.php42 public function loadGalleryThumbnailsForImage(Image $image, bool $shouldCreate): void
LOWapp/Uploads/ImageResizer.php161 protected function interventionFromImageData(string $imageData, ?string $fileType): InterventionImage
LOWapp/Uploads/ImageResizer.php195 protected function orientImageToOriginalExif(InterventionImage $image, string $originalData): void
LOWapp/Uploads/FaviconHandler.php51 public function restoreOriginalIfNotExists(): bool
LOWapp/Uploads/ImageService.php118 public function replaceExistingFromUpload(string $path, string $type, UploadedFile $file): void
LOWapp/Uploads/ImageService.php251 public function pathAccessibleInLocalSecure(string $imagePath): bool
LOWapp/Uploads/ImageService.php314 protected function checkUserHasAccessToRelationOfImageAtPath(string $path): bool
LOWapp/Uploads/ImageService.php339 protected function checkUserHasAccessToRelationOfImage(Image $image): bool
LOWapp/Uploads/ImageService.php367 public function streamImageFromStorageResponse(string $imageType, string $path): StreamedResponse
LOWapp/Permissions/JointPermissionBuilder.php121 protected function buildJointPermissionsForBooks(EloquentCollection $books, array $roles, bool $deleteOld = false):
LOWapp/Permissions/JointPermissionBuilder.php145 protected function buildJointPermissionsForEntities(array $entities): void
LOWapp/Permissions/JointPermissionBuilder.php157 protected function deleteManyJointPermissionsForEntities(array $entities): void
LOWapp/Permissions/JointPermissionBuilder.php195 protected function createManyJointPermissions(array $originalEntities, array $roles): void
189 more matches not shown…
Over-Commented Block23 hits · 23 pts
SeverityFileLineSnippet
LOWjest.config.ts41 // coveragePathIgnorePatterns: [
LOWjest.config.ts61
LOWjest.config.ts81 __DEV__: true,
LOWjest.config.ts121 // A preset that is used as a base for Jest's configuration
LOWjest.config.ts141
LOWjest.config.ts181 // "/node_modules/"
LOWjest.config.ts201 // "/node_modules/",
LOWapp/Config/oidc.php41 // A false value force-disables RP-Initiated Logout.
LOWapp/Config/app.php21 // Shows much more verbose error messages. Has potential to show
LOWapp/Config/app.php41 // This setting is a string of characters which represent different available filters:
LOWapp/Config/app.php61 // and used by BookStack in URL generation.
LOWapp/Config/app.php81 // Space separated if multiple. BookStack host domain is auto-inferred, in addition to
LOWapp/Config/session.php41 // When using the "apc" or "memcached" session drivers, you may specify a
LOWapp/Config/session.php61 // your application but you are free to change this when necessary.
LOWapp/Config/session.php81
LOWapp/Config/debugbar.php21
LOWapp/Config/debugbar.php121
LOWapp/Config/saml2.php61 // SAML protocol binding to be used when returning the <Response>
LOWapp/Config/logging.php21 // messages to the logs. The name specified in this option should match
LOWapp/Activity/Models/Comment.php41 /**
LOWresources/js/wysiwyg/ui/defaults/toolbars.ts201
LOWresources/js/wysiwyg/lexical/core/LexicalReconciler.ts721 // We also want to make sure we clear them down, otherwise we
LOW…xical/core/nodes/__tests__/unit/LexicalTabNode.test.ts61 invariant($isRangeSelection(selection), 'isRangeSelection(selection)');
Fake / Example Data18 hits · 22 pts
SeverityFileLineSnippet
LOWapp/Console/Commands/CreateAdminCommand.php124 $details['email'] = 'admin@example.com';
LOWtests/Auth/AuthTest.php114 $this->post('/login', ['email' => 'admin@example.com', 'password' => 'cattreedog']);
LOWtests/Auth/Saml2Test.php99 'email' => 'user@example.com',
LOWtests/Auth/Saml2Test.php367 $this->assertDatabaseMissing('users', ['email' => 'user@example.com']);
LOWtests/Auth/Saml2Test.php406 'email' => 'user@example.com',
LOWtests/Auth/Saml2Test.php415 'email' => 'user@example.com',
LOWtests/Auth/Saml2Test.php501 * 0 => "user@example.com"
LOWtests/Entity/PageContentFilteringTest.php320 '<div>Lorem ipsum dolor sit amet.</div><p onclick="console.log(\'test\')">Hello</p>',
LOWtests/Entity/PageContentFilteringTest.php320 '<div>Lorem ipsum dolor sit amet.</div><p onclick="console.log(\'test\')">Hello</p>',
LOWtests/Entity/PageContentFilteringTest.php321 '<div>Lorem ipsum dolor sit amet.<p onclick="console.log(\'test\')">Hello</p></div>',
LOWtests/Entity/PageContentFilteringTest.php321 '<div>Lorem ipsum dolor sit amet.<p onclick="console.log(\'test\')">Hello</p></div>',
LOWtests/Entity/PageContentFilteringTest.php322 '<div><div><div><div>Lorem ipsum dolor sit amet.<p onclick="console.log(\'test\')">Hello</p></div></div></di
LOWtests/Entity/PageContentFilteringTest.php322 '<div><div><div><div>Lorem ipsum dolor sit amet.<p onclick="console.log(\'test\')">Hello</p></div></div></di
LOWtests/Entity/PageContentFilteringTest.php323 '<div onclick="console.log(\'test\')">Lorem ipsum dolor sit amet.</div><p onclick="console.log(\'test\')">He
LOWtests/Entity/PageContentFilteringTest.php323 '<div onclick="console.log(\'test\')">Lorem ipsum dolor sit amet.</div><p onclick="console.log(\'test\')">He
LOWtests/Commands/CreateAdminCommandTest.php207 'email' => 'admin@example.com',
LOWdev/api/responses/shelves-read.json70 "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
LOWdev/api/responses/shelves-read.json70 "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
AI Slop Vocabulary5 hits · 13 pts
SeverityFileLineSnippet
MEDIUMapp/Config/logging.php37 // you a variety of powerful log handlers / formatters to utilize.
MEDIUMresources/js/wysiwyg/lexical/core/LexicalUpdates.ts252 // We leverage editor._dirtyLeaves to track the new dirty leaves after the transforms
MEDIUM…iwyg/lexical/core/__tests__/unit/LexicalEditor.test.ts529 // Add transform makes everything dirty the first time (let's not leverage this here)
MEDIUMpublic/libs/tinymce/tinymce.min.js4!function(){"use strict";var e=function(e){if(null===e)return"null";if(void 0===e)return"undefined";var t=typeof e;retur
MEDIUMpublic/libs/tinymce/tinymce.min.js4!function(){"use strict";var e=function(e){if(null===e)return"null";if(void 0===e)return"undefined";var t=typeof e;retur
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippet
CRITICALpublic/libs/tinymce/themes/silver/theme.min.js4!function(){"use strict";const e=Object.getPrototypeOf,t=(e,t,o)=>{var n;return!!o(e,t.prototype)||(null===(n=e.construc
Slop Phrases2 hits · 2 pts
SeverityFileLineSnippet
LOW…xical/core/__tests__/unit/LexicalSerialization.test.ts110 const expectedStringifiedEditorState = `{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","
LOW…xical/core/__tests__/unit/LexicalSerialization.test.ts119 `{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"Welcome to the play