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 6 commits
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
2 changes: 2 additions & 0 deletions .github/workflows/acceptance_headless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ jobs:
headless-acceptance-tests:
name: Chrome Acceptance Tests (Headless)
runs-on: ubuntu-latest
env:
MAPBOX_KEY: ${{ secrets.MAPBOX_KEY }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ jobs:
comparison_branch: master
secrets:
caller_github_token: ${{ secrets.GITHUB_TOKEN }}

2 changes: 2 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ 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
2 changes: 1 addition & 1 deletion .github/workflows/wcag_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ jobs:
call_wcag_test:
uses: yext/slapshot-reusable-workflows/.github/workflows/wcag_test.yml@v1
with:
build_script: npm run setup-test-site && npm run build-test-site
build_script: npm run setup-test-site && npm run build-test-site
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
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion static/js/default-map-api-key.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function getDefaultMapApiKey(mapProvider) {
case 'google':
return 'AIzaSyB5D45ghF1YMfqTLSzWubmlCN1euBVPhFw';
likimmy marked this conversation as resolved.
Show resolved Hide resolved
case 'mapbox':
return 'pk.eyJ1IjoieWV4dCIsImEiOiJqNzVybUhnIn0.hTOO5A1yqfpN42-_z_GuLw';
return process.env.MAPBOX_KEY;
likimmy marked this conversation as resolved.
Show resolved Hide resolved
default:
throw new Error(
`Given mapProvider: '${mapProvider}' is invalid. Expects either 'google' or 'mapbox'.`
Expand Down
4 changes: 2 additions & 2 deletions static/js/theme-map/Maps/Providers/Baidu.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ class BaiduPin extends ProviderPin {

// Load Function

const yextAPIKey = 'bxNEoKKmzVSORkUQGwRxLbtis4Wwokdg';
const yextAPIKey = process.env.BAIDU_KEY;
const baseUrl = 'https://api.map.baidu.com/getscript';

/**
Expand Down Expand Up @@ -350,7 +350,7 @@ function load(resolve, reject, apiKey, {
}

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

document.head.appendChild(negativeLngFixStyle);
}
Expand Down
2 changes: 1 addition & 1 deletion static/js/theme-map/Maps/Providers/Leaflet.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class LeafletPin extends ProviderPin {

// Load Function

const yextAPIKey = 'pk.eyJ1IjoieWV4dCIsImEiOiJqNzVybUhnIn0.hTOO5A1yqfpN42-_z_GuLw';
const yextAPIKey = process.env.MAPBOX_KEY;
likimmy marked this conversation as resolved.
Show resolved Hide resolved
const baseUrl = 'https://unpkg.com/leaflet@1.6.0/dist/leaflet';

/**
Expand Down
2 changes: 1 addition & 1 deletion static/js/theme-map/Maps/Providers/Mapbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class MapboxPin extends ProviderPin {

// Load Function

const yextAPIKey = 'pk.eyJ1IjoieWV4dCIsImEiOiJqNzVybUhnIn0.hTOO5A1yqfpN42-_z_GuLw';
const yextAPIKey = process.env.MAPBOX_KEY;

/**
* This function is called when calling {@link MapProvider#load} on {@link module:Maps/Providers/Mapbox.MapboxMaps}.
Expand Down
4 changes: 2 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,9 @@ export class AccessibilityHelpers {
export const AccessibilityChecks = {
checkAltTags: function () {
const accessibilityStyleSheet = document.createElement('style');
accessibilityStyleSheet.innerHTML = `img:not([alt]) { outline: ${outlineStyle}; }`;
accessibilityStyleSheet.innerText = `img:not([alt]) { outline: ${outlineStyle}; }`;
likimmy marked this conversation as resolved.
Show resolved Hide resolved
for (let selector of whitelist) {
accessibilityStyleSheet.innerHTML += `${selector} img:not([alt]) { outline: none; }`;
accessibilityStyleSheet.innerText += `${selector} img:not([alt]) { outline: none; }`;
}
document.head.appendChild(accessibilityStyleSheet);
}
Expand Down
Loading
Loading