how to fix "glob-parent before 5.1.2 vulnerable to Regular Expression Denial of Service in enclosure regex" - appium-ios

enter image description hereI am trying to UIKitCatalog app for simulator.
Downloaded zip file from : https://github.com/appium/ios-uicatalog
Unzip the folder
Open the terminal and navigate to the UIKitCatalog folder
Build the app by command npm install
Problem: I am facing 11 vulnerabilities (2 moderate, 9 high).
What did i try to resolve : i tried npm audit fix and npm audit fix --force commands but still unable to resolve them.
Please guide me how to resolve it.
**********************************************************************************
# npm audit report
glob-parent <5.1.2
Severity: high
glob-parent before 5.1.2 vulnerable to Regular Expression Denial of Service in enclosure regex - https://github.com/advisories/GHSA-ww39-953v-wcq6
fix available via `npm audit fix --force`
Will install gulp#3.9.1, which is a breaking change
node_modules/chokidar/node_modules/glob-parent
node_modules/glob-stream/node_modules/glob-parent
chokidar 1.0.0-rc1 - 2.1.8
Depends on vulnerable versions of glob-parent
node_modules/chokidar
glob-watcher >=3.0.0
Depends on vulnerable versions of chokidar
node_modules/glob-watcher
gulp >=4.0.0
Depends on vulnerable versions of glob-watcher
Depends on vulnerable versions of vinyl-fs
node_modules/gulp
appium-gulp-plugins >=3.0.0
Depends on vulnerable versions of gulp
Depends on vulnerable versions of gulp-debug
Depends on vulnerable versions of gulp-mocha
Depends on vulnerable versions of mocha
node_modules/appium-gulp-plugins
gulp-debug >=4.0.0
Depends on vulnerable versions of gulp
node_modules/gulp-debug
gulp-mocha >=7.0.0
Depends on vulnerable versions of gulp
Depends on vulnerable versions of mocha
node_modules/gulp-mocha
glob-stream 5.3.0 - 6.1.0
Depends on vulnerable versions of glob-parent
node_modules/glob-stream
vinyl-fs >=2.4.2
Depends on vulnerable versions of glob-stream
node_modules/vinyl-fs
nanoid 3.0.0 - 3.1.30
Severity: moderate
Exposure of Sensitive Information to an Unauthorized Actor in nanoid - https://github.com/advisories/GHSA-qrpm-p2h7-hrv2
fix available via `npm audit fix`
node_modules/nanoid
mocha 8.2.0 - 9.1.4
Depends on vulnerable versions of nanoid
node_modules/mocha
11 vulnerabilities (2 moderate, 9 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force

Related

Next.js example takes a long time to compile due to Inter google fonts

I'm trying with the trivial next.js example blog from their tutorial. However, when I access the page, I get the following situation:
$ npm run dev
> nextjs-blog#0.1.0 dev /Users/<redacted>/tmp/nextjs-blog
> next dev
ready - started server on 0.0.0.0:3000, URL: http://localhost:3000
event - compiled client and server successfully in 386 ms (165 modules)
wait - compiling /_error (client and server)...
event - compiled client and server successfully in 91 ms (166 modules)
warn - Fast Refresh had to perform a full reload due to a runtime error.
wait - compiling / (client and server)...
error - Failed to download `Inter` from Google Fonts. Using fallback font instead.
event - compiled client and server successfully in 152.9s (195 modules)
error - Failed to download `Inter` from Google Fonts. Using fallback font instead.
warn - Fast Refresh had to perform a full reload due to a runtime error.
I am not sure why it hangs for two minutes and why it can't download the google fonts. I am behind a proxy, so I suspect that could be a factor, but I cannot find anything on how to set up a proxy for next.js in the configuration (assuming the actual problem is that).
Note that HTTP_PROXY and HTTPS_PROXY are set correctly.
I'm running with these:
"next": "13.0.7"
npx create-next-app#latest nextjs-blog --use-npm --example
GitHub Link
I tried as suggested to run npm run build, and I get the following:
$ npm run build
> nextjs-blog#0.1.0 build /Users/xxx/tmp/nextjs-blog
> next build
info - Linting and checking validity of types
info - Creating an optimized production build
Failed to compile.
pages/index.tsx
`#next/font` error:
Failed to fetch `Inter` from Google Fonts.
> Build failed because of webpack errors
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nextjs-blog#0.1.0 build: `next build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nextjs-blog#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
The logs file does not give more info than this.
Same issue, I suspect it's because #next/font doesn't respect HTTPS_PROXY
environment variable. It's really frustrating for a new user (behind a proxy) who read the fantastic docs but cannot even run a minimal create-next-app project (at least the default index.js).
I Disconnected with the VPN and it solved this problem.
some solutions
solution 1
just remove the #next/font/google module, if you don't need it.
import Head from 'next/head'
import Image from 'next/image'
- import { Inter } from '#next/font/google'
import styles from '#/styles/Home.module.css'
- const inter = Inter({ subsets: ['latin'] })
solution 2
if you are using a VPN, quit your VPN and try it again.
As #ashwani-panwar suggested.
It works for me.
refs
https://github.com/vercel/next.js/discussions/46012
I had this same issue, but I wasn't behind a proxy, after a lot of code testing I discovered the fault was from #next/font/google, it stuck on compiling /page and didn't show an error. A temporary solution I found is to use a VPN service to change your IP address, there seems to be a network request issue when Next gets the fonts from the server.
Update
visiting https://fonts.google.com seems to indicate whether the issue is from Google's servers or something else, if #next/font/google is causing a slowdown visiting the fonts page ussually hangs too.

Status of VPC and Midonet

Short verion:
-Is Midonet still on the roadmap for VPC support in Eucalyptus?
-If so what version from their non-enterprise repo should work with Euca 4.4.5 VPC? (http://builds.midonet.org/)
Long version with context:
I was trying to install Eucalyptus 4.4.5 with VPC and midonet. It appears that the enterprise midonet repos/services are not available and that Midokura isn't taking emails at sale# or info# addresses. This is broken for example: https://www.midokura.com/midonet-enterprise/
From my perspective it looks like Midokura dropped enterprise support entirely and midonet.org is the only resource available.
I took a swing at the installation with midonet 5.2 from their builds (http://builds.midonet.org/) based on the most recent Eucalyptus 4.4.5 install docs which specify enterprise version mem-5.2
Trying this I ran into tons of .rpm dependency issues installing on RHEL 7.6/7.7 and never got off the ground.
Midonet VPC support is currently planned for Eucalyptus 5.
5.2.x is the correct version, you would need these yum repositories enabled:
http://builds.midonet.org/midonet-5.2/stable/el7/
http://builds.midonet.org/misc/stable/el7/
Which use the gpg key:
http://builds.midonet.org/midorepo.key
So something like:
# midokura.repo
[midokura]
name=Midokura Enterprise MidoNet
baseurl=http://builds.midonet.org/midonet-5.2/stable/el7/
enabled=1
fastestmirror_enabled=0
gpgcheck=1
gpgkey=https://builds.midonet.org/midorepo.key
#midokura-misc.repo
[midokura-misc]
name=MEM 3rd Party Tools and Libraries
baseurl=http://builds.midonet.org/misc/stable/el7/
enabled=1
fastestmirror_enabled=0
gpgcheck=1
gpgkey=https://builds.midonet.org/midorepo.key

How to know which version of Google Firebase plugin to use in Flutter app?

I've been stuck with Gradle not building (working on iOS fine). I struggled because Gradle was giving a generic error, finally got this today:
FAILURE: Build failed with an exception.
* What went wrong: Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.
> In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[18.0. 0]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.firebase:firebase-messaging:18.0.0 -> com.google.firebase:firebase-iid#[18.0.0], but fire base-iid version was 17.1.2.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art ifact with the issue. -- Project 'app' depends on project 'firebase_messaging' which depends onto com.google.firebase:firebase-messaging#18.0. 0
-- Project 'app' depends on project 'firebase_core' which depends onto com.google.firebase:firebase-core#16.0.9 -- Project 'app' depends on project 'firebase_analytics' which depends onto com.google.firebase:firebase-analytics#16.5. 0 -- Project 'app' depends on project 'firebase_remote_config' which depends onto com.google.firebase:firebase-config#16.4 .1 -- Project 'app' depends onto com.google.firebase:firebase-core#16.0.9
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https:// github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b uild.gradle file.
* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
This was after I took out the version numbers from my pubspec to see if that would help. I don't understand Google's version numbering and I'm not sure which versions of plugins I should be installing as it has caused conflicts in the past:
dependencies:
flutter:
sdk: flutter
http:
cached_network_image:
flutter_cache_manager:
carousel_pro:
cloud_firestore:
firebase_core:
firebase_remote_config:
dynamic_theme:
flutter_signin_button:
shared_preferences:
share:
flutter_search_bar:
google_sign_in:
#flutter_facebook_login:
flutter_html:
requests:
webview_flutter:
flutter_webview_plugin:
firebase_analytics:
flutter_app_badger: #for launcher badge icon (notifications)
uuid:
font_awesome_flutter:
device_info:
carousel_slider:
flutter_spinkit:
flutter_typeahead:
firebase_messaging:
html_unescape:
flutter_masked_text:
configurable_expansion_tile:
stripe_payment:
square_in_app_payments:
Google doesn't seem to maintain consistent version numbering and by taking out the version numbers I thought it would at least take the latest version of the plugins which theoretically should work. So, how can I solve this?
You should begin by putting the version number back in there.
This is an issue with firebase / play services versions being mismatched so you know for sure the other plugins in your pubspec.yaml are fine.
The dependancy which is failing is firebase messaging.
It's using many words to tell you
com.google.firebase:firebase-messaging:18.0.0 package depends on com.google.firebase:firebase-iid#[18.0.0]
but it's only finding 17.1.2.
You need
com.google.firebase:firebase-core#16.0.9
com.google.firebase:firebase-analytics#16.5.0
com.google.firebase:firebase-config#16.4.1
in the future, if you are having version issues check the specific packages GitHub issues to see if there's anything currently wrong with the version you're on. This will save you a lot of time.
I wouldn't recommend removing version numbers from your pubsepc.yaml but if you type
firebase_messaging: any
It will get a compatible version for you.
The error you are getting is not necessarily from the packages you have listed in pubspec.yaml. It is referring to the dependencies on build.gradle.
Google has no issue with the version numbers. There is a difference between the versions of packages i.e what you have listed on pubspec.yaml and the dependencies on app/build.gradle. It would be wise to reconsider the number of packages you use as every package has a dependency and you may end up in a sticky situation where multiple packages are conflicting. In addition you end up with a bloated solution for minimal functionality.
Removing version numbers will not help as some packages are incompatible. I would suggest you start with the packages you require i.e the firebase which from experience have no issues then incrementally add if necessary.

All gms/firebase libraries must use the exact same version specification (mixing versions can lead to runtime crashes)

I have upgraded gms:play-services-analytics from 11.0.4 to 16.0.4
and firebase-messaging from 11.0.4 to 17.1.0 but lint is giving this error
All gms/firebase libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 17.1.0, 16.2.0, 16.0.4, 16.0.3, 16.0.1, 16.0.0. Examples include `com.google.firebase:firebase-messaging:17.1.0` and `com.google.firebase:firebase-iid:16.2.0`
I gave a look into the External libraries i can see different versions of gms is being used here.
com.google.android.gms:play-services-ads-identifier-16.0.0
com.google.android.gms:play-services-analytics-16.0.4
com.google.android.gms:play-services-analytics-impl-16.0.4
com.google.android.gms:play-services-base-16.0.1
com.google.android.gms:play-services-basement-16.0.1
com.google.android.gms:play-services-measurement-base-16.0.3
Similary
com.google.firebase:firebase-common-16.0.0
com.google.firebase:firebase-iid-16.2.0
com.google.firebase:firebase-iid-interop-16.0.0
com.google.firebase:firebase-messaging-17.1.0
i have only added the following two dependencies
implementation 'com.google.android.gms:play-services-analytics:16.0.4'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
root level build.gradle contains
classpath 'com.google.gms:google-services:4.0.1'
As mentioned in the blog
https://android-developers.googleblog.com/2018/05/announcing-new-sdk-versioning.html
All firebase/gms libraries can now have a different versioning and the libraries mentioned above are imported by android itself.
Why i am getting this error ?
For me, it was using a rather old build tools version. Updating to build tools 28.0.3 fixed the problem.

EXC_BAD_ACCESS code=2 on including Firebase/Auth in Podfile

I am getting EXC_BAD_ACCESS after including 'Firebase/Auth' in Podfile. This happens without adding any line of firebase code. I am using swift3 on xcode 8 and the resultant pods are -
Installing Firebase (3.8.0)
Installing FirebaseAnalytics (3.5.1)
Installing FirebaseAuth (3.0.6)
Installing FirebaseCore (3.4.4)
Installing FirebaseInstanceID (1.0.8)
Using GTMOAuth2 (1.1.4)
Using GTMSessionFetcher (1.1.7)
Using GoogleAppUtilities (1.1.2)
Installing GoogleInterchangeUtilities (1.2.2)
Using GoogleSignIn (4.0.1)
Using GoogleSymbolUtilities (1.1.2)
Installing GoogleToolboxForMac 2.1.0 (was 2.1.0)
Using Localize-Swift (1.6)
Using ProtocolBuffers-Swift (3.0.6)
Using QorumLogs (0.9)
The error comes in Thread 1 in [UIViewController(FIRAScreenClassName) fira_viewDidAppear:]:
This happens only if the pod target is itself a framework which is embedded in an app eventually.
I do have Google analytics as well. Is it because ARC is not enabled? How do I do that on xcode-8?
Any other options to try?
There appears to be a problem in the latest Firebase/Core (3.8.0) release. Even #IBDesignable was crashing with a recursive call to the method signature you mentioned.
You have a couple of options:
In Info.plist (app), set FirebaseAutomaticScreenReportingEnabled to NO (bool). This solved the problem for my running application, but IBDesignable resources caused this error on build:
file:///path/to/project/Base.lproj/Main.storyboard: error: IB Designables: Failed to render and update auto layout status for UIViewController (svZ-78-1Mn): The agent crashed
You may want to temporarily downgrade to 3.7.1, for example,
pod 'Firebase/Core', '~> 3.7.1'
pod 'Firebase/Auth'
pod 'Firebase/Database'
The rest of the dependencies should take care of themselves when you run pod update.
I made a silly mistake. Never turned on Google under Authentication -> Sign in methods on Firebase
I am suspecting that the Podfile is not correct. I got into similar problem by adding Firebase dependency into a framework and I ran into the problem like this
objc[12345]: Class FIRAAppEnvironmentUtil is implemented in both
/Users/...Build/Products/Debug-iphonesimulator/SomeFramework.framework/SomeFramework
(0x105ef7fc8) and /Users/.../CurrentProject.app/CurrentProject
(0x105945108). One of the two will be used. Which one is undefined.
As mentioned in this post, you might have duplicate dependencies in different targets which could lead to weird bug like this. Adding Firebase pod into the main target and removing the Firebase pod from the framework fixed the problem for me.

Resources