Ease security audits of core code

Created on 8 July 2013, about 12 years ago
Updated 3 July 2025, 21 days ago

This was triggered by a post on security audits at https://mailman.stanford.edu/pipermail/liberationtech/2013-July/009795.html.

While we have reasonably good documentation on our security architecture, we have various security critical classes/functions scattered all over the place with nothing tying them together in a way that an auditor (or interested person) could identify this code and understand/test it.

My suggestion would be to consider adding a @security doxygen tag to all the "critical path" security related classes/functions. By "critical path" I mean code that if an auditor is satisfied is secure, their only other task is to ensure that all other code is using that API/system for that function. So, we don't need to identify every function that calls check_plain - but we should tag check_plain itself. This can include code related to authentication, authorization, https, sessions, random numbers, password hashing, output filtering and so forth.

Once we have this code identified, a good second step would be to ensure the documentation is sufficiently detailed (from a security point of view - see the great checklist at https://github.com/iSECPartners/LibTech-Auditing-Cheatsheet for the kind of questions we might want to pre-empt) and also carefully review the test coverage, and add more if needed. I am not sure if there is a way of tagging tests also (without grouping them together, which might be overkill), but that might also be worth considering.

We might also consider moving any critical functions that are floating around in "miscellaneous" code (common.inc, I am looking at you) to there own include files or classes. I think that is lower priority though, and perhaps a 9.x task.

📌 Task
Status

Postponed: needs info

Version

11.0 🔥

Component

documentation

Created by

🇺🇸United States Owen Barton

Live updates comments and jobs are added and updated live.
  • Security

    It is used for security vulnerabilities which do not need a security advisory. For example, security issues in projects which do not have security advisory coverage, or forward-porting a change already disclosed in a security advisory. See Drupal’s security advisory policy for details. Be careful publicly disclosing security vulnerabilities! Use the “Report a security vulnerability” link in the project page’s sidebar. See how to report a security issue for details.

  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States smustgrave

    Thank you for creating this issue to improve Drupal.

    We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024