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

Resolve vulnerabilities #1167

Merged
merged 16 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ jobs:
comparison_branch: master
secrets:
caller_github_token: ${{ secrets.GITHUB_TOKEN }}
MAPBOX_KEY: ${{ secrets.MAPBOX_KEY }}
BAIDU_KEY: ${{ secrets.BAIDU_KEY }}
GOOGLE_KEY: ${{ secrets.GOOGLE_KEY }}
4 changes: 4 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ jobs:
uses: yext/slapshot-reusable-workflows/.github/workflows/run_tests.yml@v1
with:
build_script: ''
secrets:
MAPBOX_KEY: ${{ secrets.MAPBOX_KEY }}
likimmy marked this conversation as resolved.
Show resolved Hide resolved
BAIDU_KEY: ${{ secrets.BAIDU_KEY }}
GOOGLE_KEY: ${{ secrets.GOOGLE_KEY }}
4 changes: 4 additions & 0 deletions .github/workflows/wcag_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ jobs:
uses: yext/slapshot-reusable-workflows/.github/workflows/wcag_test.yml@v1
with:
build_script: npm run setup-test-site && npm run build-test-site
secrets:
MAPBOX_KEY: ${{ secrets.MAPBOX_KEY }}
BAIDU_KEY: ${{ secrets.BAIDU_KEY }}
GOOGLE_KEY: ${{ secrets.GOOGLE_KEY }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ node_modules
/playwright-report/
/blob-report/
/playwright/.cache/
**/.env
3 changes: 2 additions & 1 deletion static/js/theme-map/Maps/Providers/Baidu.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,8 @@ function load(resolve, reject, apiKey, {
}

const negativeLngFixStyle = document.createElement('style');
negativeLngFixStyle.innerText = negativeLngFixCSS;
// negativeLngFixStyle.innerText = negativeLngFixCSS;
negativeLngFixStyle.innerHTML = negativeLngFixCSS;
likimmy marked this conversation as resolved.
Show resolved Hide resolved

document.head.appendChild(negativeLngFixStyle);
}
Expand Down
6 changes: 4 additions & 2 deletions static/js/theme-map/Util/Accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ export class AccessibilityHelpers {
export const AccessibilityChecks = {
checkAltTags: function () {
const accessibilityStyleSheet = document.createElement('style');
accessibilityStyleSheet.innerText = `img:not([alt]) { outline: ${outlineStyle}; }`;
// accessibilityStyleSheet.innerText = `img:not([alt]) { outline: ${outlineStyle}; }`;
accessibilityStyleSheet.innerHTML = `img:not([alt]) { outline: ${outlineStyle}; }`;
for (let selector of whitelist) {
accessibilityStyleSheet.innerText += `${selector} img:not([alt]) { outline: none; }`;
// accessibilityStyleSheet.innerText += `${selector} img:not([alt]) { outline: none; }`;
accessibilityStyleSheet.innerHTML += `${selector} img:not([alt]) { outline: none; }`;
}
document.head.appendChild(accessibilityStyleSheet);
}
Expand Down
4 changes: 2 additions & 2 deletions static/webpack/InlineAssetHtmlPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class InlineAssetHtmlPlugin {
const scriptSource = scriptNode.src;
const fileContents = this._getAssetContents(scriptSource, assetsMap);

scriptNode.innerText = fileContents;
scriptNode.textContent = fileContents;
scriptNode.dataset.fileName = scriptSource;
scriptNode.removeAttribute('src');
});
Expand All @@ -68,7 +68,7 @@ class InlineAssetHtmlPlugin {
const transformedCss = this._transformCssUrls(rawContents, relativePath);

const styleNode = dom.window.document.createElement('style');
styleNode.innerText = transformedCss;
styleNode.textContent = transformedCss;
styleNode.dataset.fileName = linkNode.href;
styleNode.dataset.webpackInline = '';
linkNode.parentNode.insertBefore(styleNode, linkNode.nextSibling);
Expand Down
3 changes: 3 additions & 0 deletions test-site/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
GOOGLE_KEY='AIzaSyB5D45ghF1YMfqTLSzWubmlCN1euBVPhFw'
MAPBOX_KEY='pk.eyJ1IjoieWV4dCIsImEiOiJqNzVybUhnIn0.hTOO5A1yqfpN42-_z_GuLw'
BAIDU_KEY='bxNEoKKmzVSORkUQGwRxLbtis4Wwokdg'
Loading