Coder Social home page Coder Social logo

coreinfrastructure / best-practices-badge Goto Github PK

View Code? Open in Web Editor NEW
1.2K 57.0 200.0 71.3 MB

🏆Open Source Security Foundation (OpenSSF) Best Practices Badge (formerly Core Infrastructure Initiative (CII) Best Practices Badge)

Home Page: https://www.bestpractices.dev

License: MIT License

Ruby 77.36% JavaScript 2.99% CSS 0.01% HTML 15.52% Shell 2.49% Makefile 0.04% Dockerfile 0.14% SCSS 1.43% Procfile 0.01%
badge best-practices rails open-source security floss openssf ossf foss supply-chain

best-practices-badge's People

Contributors

altonius avatar andrewfader avatar cary-ilm avatar clausmullie avatar dankohn avatar david-a-wheeler avatar dependabot[bot] avatar dwvisser avatar georglink avatar int-ua avatar jdossett avatar jmertic avatar kfogel avatar machaiol avatar mfriedenhagen avatar msrader avatar nealmcb avatar nilsenevoldsen avatar pbrkr avatar rootulp avatar rsp avatar ryjones avatar scovetta avatar skhakimov avatar swinslow avatar taylorcoursey avatar ulisesgascon avatar wanganyv avatar yannickmoy avatar yarikoptic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

best-practices-badge's Issues

BadgeApp: Change format of headers

In /projects/new: Currently H1 is centered bold, H2 is italic underlined. Don't use underline (that implies links).

Don't spend a lot of time (20 min or less), since LF may customize the bootstrap CSS settings anyway.
Perhaps use "startbootstrap.com" or other pre-existing common CSS settings.

Support database dump

We should be able to dump an entire database - probably as SQL database. That would enable easy backup, easy transition, etc. That should probably require a login at least, and perhaps it would become privileged operation.

Client-side validation options

https://github.com/joecorcoran/judge
https://github.com/amatsuda/html5_validators
https://github.com/posabsolute/jQuery-Validation-Engine

Creating a wizard to save intermediate state
https://github.com/schneems/wicked

My specific suggestion is to create validations but have then all run on: :certify, not on :create or :update. Then, you create controller logic for create where if the object is valid, it runs certify, and otherwise it just saves (which keeps it in an intermediate state). This isn't fully thought through, though, because you would not want an :update to be able to move you to an invalid state.

Improve form UI for tri-state values

The values for criteria are not simple booleans. We can eliminate "considered" and reduce them to three: MET, NOT MET, or UNKNOWN, but that still makes them non-booleans. As a result, we can't use traditional checkboxes. Here are some options:

  • We can implement that as a select pull-down, but these are more work for users (for each selection you have to pull down, and select)... and that matters when there are this many questions.
  • We could implement them as a radio box, but that takes a LOT of horizontal space (which is in short supply on mobile devices), due to having buttons adjacent to labels, and the selected button is separate from the text (which is slightly less clear).

We could, instead, try to implement these as tri-state values (e.g., tri-state checkboxes).

criteria name marking

This mightn't be important in the first iteration of the badges (basic / bronze). We've now agreed upon using superscripted text in square brackets, and anchors to identify the criteria name. But how do we want to handle the criteria when we have different badge types?

If a criterion is a SHOULD in bronze, and then MUST in silver, will we use the same name across the badge criteria? And will app have the logic in it to determine whether criteria are mandatory or not for each badge?

Also semi-related is whether we'll eventually have all criteria on the same page or not. I'm raising this now as if we have them all on the same page we want to have anchors for each of the criteria name (and we use the same name between badges) then if someone provides the anchor link then it'll get confusing if the names aren't unique across the different badges.

Couple of rough options are:

  1. We always have the different badge criteria on different pages.
  2. We rename the criteria name marking and anchor to be prefixed by the badge colour (e.g., bronze-crypto-pfs, silver-crypto-pfs)

BadgeApp intro text needs rewriting

The current intro page of BadgeApp needs to be rewritten. E.G., it says:

"The Best Practices Badge is a secure open source development maturity model. Projects having a CII badge will showcase the project's commitment to security...." But it's not at all clear that this is a maturity model, and 'showcase' is an odd phrasing.

How about this instead:

The CII Best Practices badge is a way for open source software (OSS) projects to show that they follow best practices. Projects can voluntarily self-certify, at no cost, by using this web application to explain how they follow each best practice. The CII Best Practices Badge is inspired by the many badges available to projects on Github. Consumers of the badge will be able to quickly assess which OSS projects are following best practices and as a result are more likely to produce higher-quality secure software.

Add basic automation framework

Add a basic framework to automatically compute form values when we can (esp. for GitHub or git-supported projects).

See implementation.md for current proposed approach.

Once we have a framework, we can implement various automation routines within it.

Simplify crypto practices section - these often don't apply

The "uses basic good cryptographic practices" section has requirements that often don't apply. Pull out delivery to a separate section, and then have a "does crypto apply" checkbox at the top - then if crypto doesn't apply, they don't need to do the rest.

Should criteria name markings be changed?

Currently criteria are marked with names using square brackets.

In commit 7df076a there's discussion on whether there's a better way. Should names be visible to casual users? (David says yes, Dan is skeptical.) If they are visible, should they be displayed differently (e.g., as smaller superscripted text)? Should these be named anchors, enabling people to jump to specific locations?

Implement showing project status

People who aren't logged in should still be able to see the detailed answers of a project. For now, just make a stub with all the answers; we can pretty it up later.

BadgeApp: User ids?

We probably ought to talk about what is a user id.

For non-GitHub users, we could just use email addresses (Heroku does this). If we do, though, we ought to not display those usernames to the general public... perhaps they should only be displayed when you're viewing a project that you can also edit. We don't have to use email addresses, I just raise that as a possibility.

For GitHub users I don't see a problem displaying them, they're public anyway.

We'll need to make sure that the naming scheme is general, so that we can add systems other than GitHub in the future.

BadgeApp: Require URLs in many human-entered fields (to point to justification)

I think we should require URLs in many of the fields that are entered by humans, with an error message something like "Please include one or more URLs that justify this claim."

Criteria may have an automatically-determined value when we have code that can determine it, but in many cases there's no way to automatically determine it, or the automated system can't figure it out. Thus, for most criteria we'll need to let people enter text to justify that they meet the criteria. Find, but we need to make it easy for other people to independently verify that the claim is true. If we require that there be a URL, then we can tell people they have to POINT to the justification.

BTW, I suspect the text entry might be easiest if we used markdown. It's widely known by software developers, and easier to enter than raw HTML (for example).

BadgeApp: Add "search by name"

Make it easy to search by name for a project. It should return a list of links to all project badge info with that name. In the longer term, we might supplement the list with Debian project names, Fedora project names, etc.

Simplify form generation code

There's a lot of repetition in the Ruby code generating the Rails - simply that (e.g., a separate method for generating the radio buttons).

More vigorously validate project input data

We want to let people fill in forms incrementally, but reject really bad data. E.G., limit the lengths of justifications to some plausible data, and limit license data to something that could be SPDX.

Form - reference doc - justification text box in wrong place

In "The project MUST include reference documentation that describes its interface. The project MAY use hypertext links to non-project material as documentation, as long as the linked-to information is available and meets the requirements." The justification box should be AFTER all that.

Start automating project entries

Once we get project and repo URLs, we should try to fill in the form and present it back with some automated results. We can then keep refining it.

Dependency badging

A concept seem to be mssing: dependancies which are themselves "badged", would not need to be checked for vulnerabilities. This would render the badging process contagious.

Password Hashing

What are the groups thoughts on password hashing? At the moment we have a criterion that states they should stored as iterated hashes with a per user salt. Should we have another criterion that is Password hashes SHOULD be generated using a key stretching algorithm like PBKDF2, Bcrypt or Scrypt? Then for the more advanced badges this could become a MUST.

Proposal: Add to criteria "Tests for major feature additions"

Greg KH suggests the following in pull request 1, #1 :

"Tests for major feature additions as without some kind of test being present, it's hard to verify if something new even works. This is now the "unofficial" rule for the kernel, as we have been burned by this in the past (feature additions that never even worked)."

I like the idea of adding this to the criteria set, but I think projects need to make it "official" in two senses: (1) their docs on making changes need to require it, and (2) there needs to be some evidence that they're doing it. If it's a super-secret rule, or one not actually used, there's not value. I don't want to add criteria to the "basic" list that few projects meet, though. If this the "unofficial" rule for the kernel, would they be willing to do that?

Show/hide recommendations/explanation/other detailed text

Make it possible to show/hide the recommendations and other detailed text. Also, make sure the recommendations aren't indented into the radio buttons.
Should hide or reveal be default?
Dan, Sam recommend "hide by default". Could also have "show all explanation" button.

Simplify entering license text for common cases

There should be a way to drop-select common licenses - most projects only use MIT, BSD 3-clause, GPLv2, GPLv2+, GPLv3, LGPLv2+, and a few others. Make it easy to select. We should probably show the SPDX license tags at least.

BadgeApp: Record history

Keep records of older versions of the badge data, and for now just show the current versions. We could do this by including an "edit date" in the record, and only show the most recent one. We could later add the ability to show older revisions.

Mention signed git tags

If a project is using git or another revision control system that supports the equivalent of signed Git tags, it should require the release manager to sign tags.

I'd send a PR, but it seems like this could fit into different places - e.g. it could just be mentioned in the MitM section, but it might also be split off into its own section, etc. Let's discuss.

BadgeApp: Auto-acquire text from criteria

It may be a good idea for BadgeApp to automatically acquire its criteria text from criteria.md. That certainly would be DRY. We can tweak the criteria.md file so it's easier to process, e.g., if additional information needs to be added.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.