Skip to content

Using an Assessment

Suppose you are deciding whether to trust a security project. How does a security assessment help you do this?

Look carefully at the goals of the project and the scenario in which they evaluated the project. Do the goals and scenarios match your use case? If not, you may have a serious problem, because little of the rest of the analysis may be relevant to your case or circumstances, or palatable to your risk tolerance.

Read through the threat matrix and think about how likely the compromise cases are in your scenario. Is there strong isolation between actors, or is there a lot of lateral movement potential? Many distributed systems have a single point of failure (or many single points of failure) because they fail to compartmentalize trust adequately. If this is true in your case, the risk is very high.

Look at the security practices the project uses for bug disclosures, code review, testing, etc. This can give you an idea of the security emphasis and expertise of the group. Some things to look for are: the amount of test code coverage, the way in which code is admitted into the project, the way in which dependencies are vetted and kept up-to-date, and the amount of security expertise in the group. Looking at past security audits (if they exist) can also be very illuminating.

Note

Balancing Coverage Expectations, Commentary by Justin Cappos

For test code coverage, a natural initial thought is that the closer to 100% you are, the better off the project is. I have even heard managers say that people should not ship code if it is below a specific threshold (95%, 99%, etc.).

My experience is that shooting for a fixed target across projects is too rigid. Some code is really unreasonable to test. For example, a project with a lot of error handling code that aborts during hardware failures may be difficult to test in a good way. Different languages and frameworks can also make getting a high degree of test code coverage very challenging. In these cases you get almost all of the benefit from the first 9X% or so of test coverage. Often the last bit of testing just isn't worth it compared to the other things you could be spending your time fixing and improving.

Questions to ask of a project

The project's process for admitting code and dependencies should, at a minimum, look at the sorts of aspects you would look at in any software project. How clean and well tested is the code? How quickly do the maintainers respond to issues? What sorts of issues are raised? Is security a priority? What is the release cadence? Is disclosure and documentation around fixes provided in a clear manner? How big and diverse is the contributor base? Do they seem to often take upstream contributions? Are those contributions vetted appropriately?

Does the project demonstrate strong security expertise? Do they have a clearly stated threat model? Are the actors and actions for the project clear? Are actors appropriately compartmentalized? Have they described why their security mechanisms are in place and what they are supposed to protect against?

Has the project had a security audit? How did it go? Note that just counting the vulnerabilities discovered isn't necessarily a great metric, as different auditors put different weight on the same issue. However, you should be concerned if a lot of serious issues were found, even if those were later addressed. Remember, since this is just one perspective from one moment in time, a project that fixes issues from an audit does not give a strong indication that further bugs do not exist now. So, be sure to check whether they have also improved their security practices.

Note

Red Flags, Commentary by Justin Cappos

There are a lot of red flags to look for when looking at a project:

A lack of threat modeling. I've spoken with engineers at major tech companies that were making security technology and asked them what the technology was supposed to protect against. Multiple times, across different companies and products, I've had them say that they will figure the threat model out after they finish building it. This is a huge red flag because if you don't understand what you are trying to protect and from which attacks, how can you hope to do so? Fortunately, this is a small minority of people at these companies, but still it is a telling problem.

Viewing security mechanisms as features. Another major mistake I've seen made is that some developers seem to feel that adding a security mechanism is just a piece of functionality you can bolt on at the end. In other words, you could just add AES encryption to a system and then just say "I use AES" and then your system would be secure because AES (with reasonable key sizes) is thought to be secure today. Unfortunately, like putting a bike lock on a bicycle, it really matters where you put the lock. If you just attach it to the seat, the lock really isn't doing anything. So, security isn't something you can just defer until later. You need to design for security as early as possible.

A general lack of understanding of security by the security team. Occasionally, even in major companies, you will encounter folks that clearly misunderstand very basic concepts about security. While no one was born with deep security knowledge, a lack of understanding needs to be coupled with a desire to learn. Someone on the team needs a generally strong understanding of security. I've done security designs with domain experts in fields where I am not an expert (like automotive). As long as folks are willing to learn and discuss problems openly, this can work out well. Someone with a security skillset needs to be involved with design. If you are not overly comfortable with security and don't know how to judge the group's design(s), then ask other experts to take a look. If they have published the work in a reputable academic venue, then the academic peer review process is another way to ensure that review from other experts has happened.

Over-reliance on standards. Except for the excellent cryptographic standards from NIST which were done by a competitive process, most of the security designs through other organizations (ISO, IETF, IEEE) are historically very hit and miss. (Note, I am saying this as someone with projects that have been standardized through different organizations.) Anyone accepting standardization as a strong indicator of quality does so at substantial risk. Many protocols and projects with a very poor security history (e.g., RFC 7519) were standardized through these organizations. Looking at the security analysis of a technology is a much stronger indicator.

Over-reliance on branding. Similar to over-reliance on standards, some people seem to feel that if it comes from company X, it will be great. While I've seen many excellent things come from top 5 tech companies, I've also seen them release some horribly insecure technologies. Every company has hits and misses. Don't be too quick to jump on the bandwagon. As before, peer review by experts is a much stronger indicator than a brand name.

Over-reliance on outdated technology that has known weaknesses. As security technologies age, the community gets more experience attacking them. It is important to understand the known limitations of technologies when designing new systems. For a first example, X.509 certificate parsing errors are commonly used by attackers to bypass security protections in a system. Using a format like X.509 or JWT leads to a lot of security issues due to the complexity of parsing (see, for example, the JWT "none" algorithm attack, the wolfSSL 3.10.2 x509 certificate text parsing off-by-one, and the OpenSSL 3 certificate parsing buffer overflow, CVE-2022-3602). As another example, technologies like revocation via OCSP and CRL also have huge drawbacks in practice, and are not used in modern browsers despite being designed specifically for this use case! If a project doesn't seem to understand the security risks and limitations of outdated technology, then this should be a major concern.

Reinventing the wheel. Some developers just like to invent things and don't want to use tools or techniques from elsewhere. This is particularly problematic in security. You should be using the designs that have held up to stringent review unless there is a clear reason to create something new. Reinvention raises new opportunities to make mistakes and introduce vulnerabilities.

A lack of awareness of other technologies. A major indicator that a project doesn't understand security is a lack of awareness of the pros and cons of other solutions in the space. If someone does not seem to understand what the differences are between competing approaches, they likely do not understand the threat landscape or problem domain either. While closed source, commercial systems can be difficult for outsiders to understand, for well documented, public systems you should be able to get a clear description of the differences.

Reading a joint assessment

A joint assessment is structured in a way that is intended to make it easier for an adopter to read. Most importantly, strongly consider the reviewers' summary and recommendations. These point out what the reviewers believe are the most concerning aspects from a security standpoint.

The project's self-assessment is also valuable because it describes how the project sees itself and its security posture. Consider carefully the scope of their threat model. Is it better for a logging system to have a flawed system which sometimes fails to sanitize personal information, or to never try to sanitize it at all? The answer could go either way. Counterintuitively to some people, if users of the logging system expect its sanitization to be perfect and then use it in situations where they otherwise wouldn't, its existence can certainly harm security.

Here are some example assessments and some quick notes a reader would likely take from them. Note that these reflect the assessment at the time it was completed. The project may have addressed the described issues in the interim.

  • Buildpacks: Buildpacks possess stronger security guarantees when compared to ecosystem alternatives by leveraging underutilized security capabilities in the Open Container Initiative's Image Specification. Additionally, given buildpacks' "in-place upgrade capabilities", buildpacks can shorten the time to patch bugs and address security issues across large fleets of images exponentially faster. At the time it was suggested for the project to continue the effort to document its build system and security practices.
  • Harbor: Users still need to do a review of the resulting security properties given the way they deploy it. The mechanisms are all there for strong security, but there are concerns that it is not being deployed in that manner by some adopters.
  • in-toto: in-toto provides software supply chain security by validating cryptographically protected metadata about the process. At the time of assessment, the documentation around getting started, usability, and best practices were thought to be inadequate for some adopters.
  • Open Policy Agent: The project fills an important role in the ecosystem by providing a common language for security policies. A lot of the concerns raised revolve around understandability and usability of the policies that are created. It seems non-trivial to write secure and correct policies, and if a failure happens in this case, the resulting system may not be secure.
  • SPIFFE / SPIRE: This project handles secure provisioning and management of key materials in heterogeneous cloud and on-prem environments. The reviewers' summary is very positive and only lists some minor TODOs for the team in different areas. Their assessment indicates they have a single (trusted) server and that there are some risks with their agent implementation. However, the project seems to have a good understanding of this and has worked to minimize the risk from these components.