Giter Club home page Giter Club logo

pepipost / bimi-official Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 4.0 23.29 MB

โœจ Brand Indicators for Message Identification or BIMI ( ๐Ÿ“ข pronounced: Bih-mee) is an emerging email ๐Ÿ“ง specification that enables the use of brand-controlled logos within supporting email clients ๐Ÿ”ฎ.

Home Page: https://bimigroup.org/

License: MIT License

Python 34.16% HTML 57.26% CSS 8.58%
emails authentication python3 brand message jinja flask-application flask

bimi-official's People

Contributors

dependabot[bot] avatar geniusdibya avatar hiteshpandey avatar ivikramsahu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bimi-official's Issues

BIMI Inspector May Be Too Greedy

It has been mentioned that the BIMI Inspector tool on the bimigroup.org website (https://bimigroup.org/bimi-generator/) may be flagging condition that shouldnโ€™t be flagged.

Sample domain - response.talktalkbusiness.co.uk

Results include the following text:

VMC Certificate File Issues You Need To Fix

Warning: The X.509 certificate provided is not valid for the purposes of client auth, server auth

The language about the cert not being valid for client auth, server auth was confusing.

It was also noted that this domain had some SVG image issues which were noted by the BIMI Inspector, but no one knew whether or not the SVG image issues triggered the report of VMC issues.

DMARC checks

        else:
            dmarcRecord['status'] = dmarc['valid']
            searchpct = re.search(regex_pct, dmarc['record'])
            if dmarc['record'].find('p=quarantine')==-1 and dmarc['record'].find('p=reject')==-1:
                dmarcRecord['status'] = False
                dmarcRecord['errors'] = ["dmarc policy should be set to p=quarantine or p=reject for BIMI to work"]
            if searchpct and int(searchpct.group(0).split("=")[1]) != 100:
                dmarcRecord['status'] = False
            dmarcRecord['record'] = dmarc['record']

This section in CheckRecords is subtly wrong, the DMARC record must be enforcing, which means either a p=quarantine with an effective pct=100, or p=reject with any pct= value.

Additionally, I believe there is both a bug and an omission here

if dmarc['record'].find('p=quarantine')==-1 and dmarc['record'].find('p=reject')==-1:

We are not checking subdomain policy as required by the spec, and the find method call will match on those policies, such that a sp=reject policy will be matched by the .find('p=reject') search.

We also assume that records are properly formatted as lowercase, there are some in the wild which are not.

For example, "v=DMARC1; P=none; sp=reject;"

Personally, I dislike using regex to parse records with structure, matches can happen in unexpected places.

I don't see any code to check DMARC at the org domain level, do we do that?

Evidence documents do not require the .pem extension

        regex_cert = r"v=BIMI1;(?=.*(l=((.*):\/\/(.*.svg|.*.SVG)))\b)(?=.*(a=((.*):\/\/(.*.pem|.*.PEM)))\b).*(;$| |$)"
        regex_without_cert = r"v=BIMI1;(|\s+)l=((.*):\/\/(.*.svg|.*.SVG))(;| |).*"

.pem is not a required extension, I have also seen these extensions capitalized as Svg in the wild, which would fail the regex.

Consider using PSL

The tld extract module supports lookups against the PSL, however this isn't enabled by default.
Using the PSL is (I believe) the primary method MBPs use to determine organizational domains, so using this would more closely align with how MBPs behave.

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.