
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
JavaScript library to indicate if we are dealing with a WebView or a Web page.
JavaScript WebView detection for Node and the browser.
Sometimes you need to know if a DOM document or an HTTP request is performed by a UIWebView/WebView or not. Especially to serve a more contextualised experience or to dynamically load components.
WebView detection is twofold:
npm install --save is-webview
The library is browserify and webpack friendly. Use them!
var iswebview = require('is-webview');
module.exports = function(req, res, next){
if (iswebview(req.headers['User-Agent'])) {
// set-up whatever is needed for a WebView
// ...
next();
}
};
if (isWebview(navigator.userAgent)) {
// do whatever is needed for a WebView display
// ...
};
iswebview(userAgent)
userAgent
(String): Browser User-Agent header stringDetects a WebView from browser properties (if available) and from a User-Agent string.
if (iswebview(navigator.userAgent)) {
// ...
}
iswebview(userAgent, configObject)
userAgent
(String): Browser User-Agent header stringconfigObject
(Object): see below.Detects a WebView from a custom User-Agent string, browser properties (if available) and fallbacks to regular User-Agent string.
if (iswebview(navigator.userAgent, { appName: 'FooBar' })) {
// ...
}
A configuration object conveys cues to assist the detection:
appName
(String): the app name explicitly set in your WebView properties/settings.Copyright 2014 British Broadcasting Corporation
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
FAQs
JavaScript library to indicate if we are dealing with a WebView or a Web page.
The npm package is-webview receives a total of 353 weekly downloads. As such, is-webview popularity was classified as not popular.
We found that is-webview demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.