See #594412: Correctly label all site-owning super-admin permissions for some background discussion, but splitting it off into its own issue since it could use some dedicated discussion in the SimpleTest queue.
We are trying to only put the security warning label on Drupal core permissions which truly should be restricted to trusted users and which, by design, allow a site to be taken over. The "Administer tests" permission currently has the warning on it (which dates back to when the module was first committed to core, as far as I can tell from CVS history). However, it's not clear to me that there's any way in which it is designed to allow someone to take over a site. If I'm right, the warning should be removed.
Is there anything I'm missing that would invalidate that? (Note #799932: Simpletest HTTP authentication credentials should use the 'password' form element is somewhat related, although that's definitely not the reason this permission got that warning originally, plus it isn't really a security risk by itself.)
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | interdiff.txt | 1.05 KB | mile23 |
| #18 | 799936_18.patch | 1.42 KB | mile23 |
| #14 | 799936_14.patch | 1.33 KB | mile23 |
| #2 | 799936-simpletest-restrict-access.patch | 406 bytes | brianV |
| #1 | simpletest-permission-warning-799936-1.patch | 583 bytes | David_Rothstein |
Comments
Comment #1
David_Rothstein commentedHere's the patch for review - the code itself is pretty trivial :)
Comment #2
brianV commentedI agree...
Perhaps someone thought that this should be restricted as running a battery of tests on a live site would be detrimental to performance, but I don't that's a security issue...
Rerolled for D8.
Comment #3
devin carlson commentedEverything looks good; having access to run tests shouldn't compromise site security. The patch still applies cleanly.
This should be committed to both D8 and D7.
Comment #4
dries commentedI agree with this too. Any objections?
Comment #5
catchSeems fine to me. It is more of a DOS issue than a security issue and there are other things people could do for that. As well as it being a bit strange to enable simpletest on a live site at all in the first place.
Comment #6
Bojhan commentedYhea, I have no idea why this error is there - lets remove it!
Comment #7
catchDiscussed this a bit in irc with chx and boombatower.
* we should go over the simpletest settings screen to make sure there's no XSS or similar in there. Having this warning means we might have been sloppy on that screen, and it's the difference between an SA or not.
* if we remove this warning, could we add another warning somewhere to make it really, really clear that you should never enable simpletest on a production site.
Comment #8
boombatower commentedsub
Comment #9
catchLooks like a cross post.
Comment #14
mile23Rerolled (really re-done).
Added a report to the status page saying "turn off simpletest, please," or words to that effect, per #7. Part of the reason users shouldn't have simpletest enabled is because it has composer dev requirements as a dependency.
We could combine #7 with #2830880: Warn site admins when composer dev dependencies are installed inside of docroot but it's also true that the user could have dev requirements installed but not simpletest.
#7 also says:
Probably a good idea, but that looks a lot like maintenance, and we don't really want to do that because we're deprecating simpletest. #2866082: [Plan] Roadmap for Simpletest
Comment #15
borisson_I agree that just adding the warning is sufficient. I'm not sure if we should add a test just for this warning - I think it's sufficiently trivial.
Comment #16
mile23That was quick. Thanks.
And... You know... Good luck testing whether the simpletest module is enabled or not. :-)
Comment #17
catchShould this just say 'Testing' module?
This can just be isset(), the values of array are always Extension objects.
Comment #18
mile23Done and done. Also, it now links to https://www.drupal.org/docs/8/security/secure-configuration-for-site-bui... which I updated to talk a little bit about simpletest and composer install --no-dev.
Comment #19
borisson_Changes requested in #17 are done in #18, back to RTBC.
Comment #20
David_Rothstein commentedI think this is misleading, because it implies that turning off the Simpletest module will remove the security risk. But if the actual concern is dev dependencies in the codebase, then turning off the module won't do anything to fix that, right? In other words, it seems like the actual warning that's needed is #2830880: Warn site admins when composer dev dependencies are installed inside of docroot, not this one.
Although that would certainly be annoying and a performance concern if it were to happen, I don't see how it's a specific security risk.
Comment #21
catchComment #26
quietone commentedTriaging issues in simpletest.module as part of the Bug Smash Initiative to determine if they should be in the Simpletest Project or core.
This looks like it belongs in the Simpletest project.