Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add sri-history file and update process #476

Merged
merged 1 commit into from
Aug 11, 2017
Merged

Conversation

WilcoFiers
Copy link
Contributor

Since axe-core is injected into many many web pages, it is very important that we’re able to check the integrity of the file we’re injecting. Keeping the SRI of all previously published versions around makes this much easier.

https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity

"axe.js": "sha256-rkyHB2lHjs+tissQLBUxuxIvWlzRbS4f4cdaH+TjQvo=",
"axe.min.js": "sha256-MGWkallV18uw6bSq6w8cjbGsf9v4rJtXP+NDtMEbO14="
},
"2.3.1": {
Copy link
Contributor

@marcysutton marcysutton Aug 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I ran it my hashes changed for aXe-2.3.1, is that because there are changes on the develop branch but the version is still at 2.3.1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, because this branched from dev, which has changes that aren't in 2.3.1. If you replace your axe.js file with the 2.3.1 release it'll match.

@WilcoFiers WilcoFiers merged commit 25ddb47 into develop Aug 11, 2017
@WilcoFiers WilcoFiers deleted the sha1-history branch August 11, 2017 10:39
@marcysutton
Copy link
Contributor

We need docs for this, since it isn't immediately clear when we should be running this command. It already impacted our latest releases of aXe-core.

@WilcoFiers
Copy link
Contributor Author

@marcysutton Was it because we're not using npm version to bump the version? This PR should warn you before publishing with the wrong SRI. Did that not happen?

@marcysutton
Copy link
Contributor

npm version doesn't update all the necessary files, and I haven't been using it. So yeah, that's probably the problem. We need to document this as part of our Build/Release process guidelines.

@WilcoFiers
Copy link
Contributor Author

I can add a comment to the build file explaining it further. We shouldn't be doing this stuff manually anyway. We'll have Attest-master ready before the next release, so we'll automate this step. But yeah, not using npm version is probably where this went wrong than. Is that because of the changelog thing?

@marcysutton
Copy link
Contributor

No, it's because I moved to npm run release, which doesn't use npm version and thus trigger sri-history. There are also 3 files that have to get bumped: package.json, bower.json and axe.d.ts, and npm version doesn't do it.

mrtnvh pushed a commit to mrtnvh/axe-core that referenced this pull request Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants