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

Download BalenaOS images from URL #1132

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vipulgupta2048
Copy link
Member

The PR enables the use of an image URL in the config.js of the test suite for it to be later used to download a BalenaOS image.

  • minor: Add Download from URL feature
  • Modify Client to accept URLs for image property

@vipulgupta2048 vipulgupta2048 marked this pull request as draft February 22, 2024 17:38
function isUrl(filePath) {
let pattern = new RegExp('^(https?:\\/\\/)?' + // protocol
'(\\S+\\:\\S+@)?' + // optional user:pass authentication
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name

Check failure

Code scanning / CodeQL

Inefficient regular expression High

This part of the regular expression may cause exponential backtracking on strings starting with '0' and containing many repetitions of '0'.
function isUrl(filePath) {
let pattern = new RegExp('^(https?:\\/\\/)?' + // protocol
'(\\S+\\:\\S+@)?' + // optional user:pass authentication
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name

Check failure

Code scanning / CodeQL

Inefficient regular expression High

This part of the regular expression may cause exponential backtracking on strings starting with '0' and containing many repetitions of '0'.
function isUrl(filePath) {
let pattern = new RegExp('^(https?:\\/\\/)?' + // protocol
'(\\S+\\:\\S+@)?' + // optional user:pass authentication
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name

Check failure

Code scanning / CodeQL

Inefficient regular expression High

This part of the regular expression may cause exponential backtracking on strings starting with '0' and containing many repetitions of '0'.
@vipulgupta2048 vipulgupta2048 force-pushed the vipulgupta2048/download-url branch from 90dbe45 to 3f5ff3a Compare February 22, 2024 17:44
@vipulgupta2048 vipulgupta2048 force-pushed the vipulgupta2048/download-url branch from 3f5ff3a to 999db4d Compare February 22, 2024 17:45
Signed-off-by: Vipul Gupta (@vipulgupta2048) <[email protected]>
@vipulgupta2048 vipulgupta2048 force-pushed the vipulgupta2048/download-url branch from 999db4d to 5d3fc08 Compare February 22, 2024 17:59
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.

1 participant