Installations
npm install cordova-plugin-geolocation
Developer Guide
Typescript
No
Module System
N/A
Node Version
18.16.0
NPM Version
9.5.1
Score
92.4
Supply Chain
99.5
Quality
83.4
Maintenance
100
Vulnerability
88
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (60.7%)
Objective-C (30.94%)
Java (8.36%)
Developer
Download Statistics
Total Downloads
8,330,329
Last Day
3,323
Last Week
13,338
Last Month
57,502
Last Year
855,512
GitHub Statistics
636 Stars
354 Commits
664 Forks
58 Watching
21 Branches
85 Contributors
Package Meta Information
Latest Version
5.0.0
Package Id
cordova-plugin-geolocation@5.0.0
Unpacked Size
99.29 kB
Size
24.25 kB
File Count
15
NPM Version
9.5.1
Node Version
18.16.0
Publised On
21 Sept 2023
Total Downloads
Cumulative downloads
Total Downloads
8,330,329
Last day
-11.4%
3,323
Compared to previous day
Last week
-16.2%
13,338
Compared to previous week
Last month
11.7%
57,502
Compared to previous month
Last year
-11.2%
855,512
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
1
title: Geolocation description: Access GPS data.
cordova-plugin-geolocation
This plugin provides information about the device's location, such as latitude and longitude.
Common sources of location information include Global Positioning System (GPS) and location inferred from network signals such as IP address, RFID, WiFi and Bluetooth MAC addresses, and GSM/CDMA cell IDs. There is no guarantee that the API returns the device's actual location.
To get a few ideas, check out the sample at the bottom of this page or go straight to the reference content.
This API is based on the W3C Geolocation API Specification.
WARNING: Collection and use of geolocation data raises important privacy issues. Your app's privacy policy should discuss how the app uses geolocation data, whether it is shared with any other parties, and the level of precision of the data (for example, coarse, fine, ZIP code level, etc.). Geolocation data is generally considered sensitive because it can reveal user's whereabouts and, if stored, the history of their travels. Therefore, in addition to the app's privacy policy, you should strongly consider providing a just-in-time notice before the app accesses geolocation data (if the device operating system doesn't do so already). That notice should provide the same information noted above, as well as obtaining the user's permission (e.g., by presenting choices for OK and No Thanks). For more information, please see the Privacy Guide.
This plugin defines a global navigator.geolocation
object (for platforms
where it is otherwise missing).
Although the object is in the global scope, features provided by this plugin
are not available until after the deviceready
event.
1 2 document.addEventListener("deviceready", onDeviceReady, false); 3 function onDeviceReady() { 4 console.log("navigator.geolocation works well"); 5 } 6
Installation
This requires cordova 5.0+ ( current stable 1.0.0 )
cordova plugin add cordova-plugin-geolocation
Older versions of cordova can still install via the deprecated id ( stale 0.3.12 )
cordova plugin add org.apache.cordova.geolocation
It is also possible to install via repo url directly ( unstable )
cordova plugin add https://github.com/apache/cordova-plugin-geolocation.git
Supported Platforms
- Android
- iOS
Methods
- navigator.geolocation.getCurrentPosition
- navigator.geolocation.watchPosition
- navigator.geolocation.clearWatch
Objects (Read-Only)
- Position
- PositionError
- Coordinates
navigator.geolocation.getCurrentPosition
Returns the device's current position to the geolocationSuccess
callback with a Position
object as the parameter. If there is an
error, the geolocationError
callback is passed a
PositionError
object.
navigator.geolocation.getCurrentPosition(geolocationSuccess,
[geolocationError],
[geolocationOptions]);
Parameters
-
geolocationSuccess: The callback that is passed the current position.
-
geolocationError: (Optional) The callback that executes if an error occurs.
-
geolocationOptions: (Optional) The geolocation options.
Example
1 2 // onSuccess Callback 3 // This method accepts a Position object, which contains the 4 // current GPS coordinates 5 // 6 var onSuccess = function(position) { 7 alert('Latitude: ' + position.coords.latitude + '\n' + 8 'Longitude: ' + position.coords.longitude + '\n' + 9 'Altitude: ' + position.coords.altitude + '\n' + 10 'Accuracy: ' + position.coords.accuracy + '\n' + 11 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '\n' + 12 'Heading: ' + position.coords.heading + '\n' + 13 'Speed: ' + position.coords.speed + '\n' + 14 'Timestamp: ' + position.timestamp + '\n'); 15 }; 16 17 // onError Callback receives a PositionError object 18 // 19 function onError(error) { 20 alert('code: ' + error.code + '\n' + 21 'message: ' + error.message + '\n'); 22 } 23 24 navigator.geolocation.getCurrentPosition(onSuccess, onError); 25
iOS Quirks
Since iOS 10 it's mandatory to provide an usage description in the info.plist
if trying to access privacy-sensitive data. When the system prompts the user to allow access, this usage description string will displayed as part of the permission dialog box, but if you didn't provide the usage description, the app will crash before showing the dialog. Also, Apple will reject apps that access private data but don't provide an usage description.
This plugins requires the following usage description:
NSLocationWhenInUseUsageDescription
describes the reason that the app accesses the user's location, this is used while the app is running in the foreground.NSLocationAlwaysAndWhenInUseUsageDescription
describes the reason that the app is requesting access to the user’s location information at all times. Use this key if your iOS app accesses location information while running in the background and foreground.NSLocationAlwaysUsageDescription
describes the reason that the app is requesting access to the user's location at all times. Use this key if your app accesses location information in the background and you deploy to a target earlier than iOS 11. For iOS 11 and later, add bothNSLocationAlwaysUsageDescription
andNSLocationAlwaysAndWhenInUseUsageDescription
to your app’sInfo.plist
file with the same message.
To add these entries into the info.plist
, you can use the edit-config
tag in the config.xml
like this:
<edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="merge">
<string>need location access to find things nearby</string>
</edit-config>
<edit-config target="NSLocationAlwaysAndWhenInUseUsageDescription" file="*-Info.plist" mode="merge">
<string>need location access to find things nearby</string>
</edit-config>
<edit-config target="NSLocationAlwaysUsageDescription" file="*-Info.plist" mode="merge">
<string>need location access to find things nearby</string>
</edit-config>
Android Quirks
For historic reasons, this plugin requires GPS Hardware on Android devices, so your app will not be able to run on devices without. If you want to use this plugin in your app, but you do not require actual GPS Hardware on the device, install the plugin using the variable GPS_REQUIRED set to false:
cordova plugin add cordova-plugin-geolocation --variable GPS_REQUIRED="false"
If Geolocation service is turned off the onError
callback is invoked after timeout
interval (if specified).
If timeout
parameter is not specified then no callback is called.
navigator.geolocation.watchPosition
Returns the device's current position when a change in position is detected.
When the device retrieves a new location, the geolocationSuccess
callback executes with a Position
object as the parameter. If
there is an error, the geolocationError
callback executes with a
PositionError
object as the parameter.
var watchId = navigator.geolocation.watchPosition(geolocationSuccess,
[geolocationError],
[geolocationOptions]);
Parameters
-
geolocationSuccess: The callback that is passed the current position.
-
geolocationError: (Optional) The callback that executes if an error occurs.
-
geolocationOptions: (Optional) The geolocation options.
Returns
- String: returns a watch id that references the watch position interval. The watch id should be used with
navigator.geolocation.clearWatch
to stop watching for changes in position.
Example
1 2 // onSuccess Callback 3 // This method accepts a `Position` object, which contains 4 // the current GPS coordinates 5 // 6 function onSuccess(position) { 7 var element = document.getElementById('geolocation'); 8 element.innerHTML = 'Latitude: ' + position.coords.latitude + '<br />' + 9 'Longitude: ' + position.coords.longitude + '<br />' + 10 '<hr />' + element.innerHTML; 11 } 12 13 // onError Callback receives a PositionError object 14 // 15 function onError(error) { 16 alert('code: ' + error.code + '\n' + 17 'message: ' + error.message + '\n'); 18 } 19 20 // Options: throw an error if no update is received every 30 seconds. 21 // 22 var watchID = navigator.geolocation.watchPosition(onSuccess, onError, { timeout: 30000 }); 23
geolocationOptions
Optional parameters to customize the retrieval of the geolocation
Position
.
{ maximumAge: 3000, timeout: 5000, enableHighAccuracy: true };
Options
-
enableHighAccuracy: Provides a hint that the application needs the best possible results. By default, the device attempts to retrieve a
Position
using network-based methods. Setting this property totrue
tells the framework to use more accurate methods, such as satellite positioning. (Boolean) -
timeout: The maximum length of time (milliseconds) that is allowed to pass from the call to
navigator.geolocation.getCurrentPosition
orgeolocation.watchPosition
until the correspondinggeolocationSuccess
callback executes. If thegeolocationSuccess
callback is not invoked within this time, thegeolocationError
callback is passed aPositionError.TIMEOUT
error code. (Note that when used in conjunction withgeolocation.watchPosition
, thegeolocationError
callback could be called on an interval everytimeout
milliseconds!) (Number) -
maximumAge: Accept a cached position whose age is no greater than the specified time in milliseconds. (Number)
Android Quirks
If Geolocation service is turned off the onError
callback is invoked after timeout
interval (if specified).
If timeout
parameter is not specified then no callback is called.
navigator.geolocation.clearWatch
Stop watching for changes to the device's location referenced by the
watchID
parameter.
navigator.geolocation.clearWatch(watchID);
Parameters
- watchID: The id of the
watchPosition
interval to clear. (String)
Example
1 2 // Options: watch for changes in position, and use the most 3 // accurate position acquisition method available. 4 // 5 var watchID = navigator.geolocation.watchPosition(onSuccess, onError, { enableHighAccuracy: true }); 6 7 // ...later on... 8 9 navigator.geolocation.clearWatch(watchID); 10
Position
Contains Position
coordinates and timestamp, created by the geolocation API.
Properties
-
coords: A set of geographic coordinates. (Coordinates)
-
timestamp: Creation timestamp for
coords
. (DOMTimeStamp)
Coordinates
A Coordinates
object is attached to a Position
object that is
available to callback functions in requests for the current position.
It contains a set of properties that describe the geographic coordinates of a position.
Properties
-
latitude: Latitude in decimal degrees. (Number)
-
longitude: Longitude in decimal degrees. (Number)
-
altitude: Height of the position in meters above the ellipsoid. (Number)
-
accuracy: Accuracy level of the latitude and longitude coordinates in meters. (Number)
-
altitudeAccuracy: Accuracy level of the altitude coordinate in meters. (Number)
-
heading: Direction of travel, specified in degrees counting clockwise relative to the true north. (Number)
-
speed: Current ground speed of the device, specified in meters per second. (Number)
Android Quirks
altitudeAccuracy: Not supported by Android devices, returning null
.
PositionError
The PositionError
object is passed to the geolocationError
callback function when an error occurs with navigator.geolocation.
Properties
-
code: One of the predefined error codes listed below.
-
message: Error message describing the details of the error encountered.
Constants
PositionError.PERMISSION_DENIED
- Returned when users do not allow the app to retrieve position information. This is dependent on the platform.
PositionError.POSITION_UNAVAILABLE
- Returned when the device is unable to retrieve a position. In general, this means the device is not connected to a network or can't get a satellite fix.
PositionError.TIMEOUT
- Returned when the device is unable to retrieve a position within the time specified by the
timeout
included ingeolocationOptions
. When used withnavigator.geolocation.watchPosition
, this error could be repeatedly passed to thegeolocationError
callback everytimeout
milliseconds.
- Returned when the device is unable to retrieve a position within the time specified by the
Sample: Get the weather, find stores, and see photos of things nearby with Geolocation
Use this plugin to help users find things near them such as Groupon deals, houses for sale, movies playing, sports and entertainment events and more.
Here's a "cookbook" of ideas to get you started. In the snippets below, we'll show you some basic ways to add these features to your app.
- Get your coordinates.
- Get the weather forecast.
- Receive updated weather forecasts as you drive around.
- See where you are on a map.
- Find stores near you.
- See pictures of things around you.
Get your geolocation coordinates
1 2function getWeatherLocation() { 3 4 navigator.geolocation.getCurrentPosition 5 (onWeatherSuccess, onWeatherError, { enableHighAccuracy: true }); 6} 7
Get the weather forecast
1 2// Success callback for get geo coordinates 3 4var onWeatherSuccess = function (position) { 5 6 Latitude = position.coords.latitude; 7 Longitude = position.coords.longitude; 8 9 getWeather(Latitude, Longitude); 10} 11 12// Get weather by using coordinates 13 14function getWeather(latitude, longitude) { 15 16 // Get a free key at http://openweathermap.org/. Replace the "Your_Key_Here" string with that key. 17 var OpenWeatherAppKey = "Your_Key_Here"; 18 19 var queryString = 20 'http://api.openweathermap.org/data/2.5/weather?lat=' 21 + latitude + '&lon=' + longitude + '&appid=' + OpenWeatherAppKey + '&units=imperial'; 22 23 $.getJSON(queryString, function (results) { 24 25 if (results.weather.length) { 26 27 $.getJSON(queryString, function (results) { 28 29 if (results.weather.length) { 30 31 $('#description').text(results.name); 32 $('#temp').text(results.main.temp); 33 $('#wind').text(results.wind.speed); 34 $('#humidity').text(results.main.humidity); 35 $('#visibility').text(results.weather[0].main); 36 37 var sunriseDate = new Date(results.sys.sunrise); 38 $('#sunrise').text(sunriseDate.toLocaleTimeString()); 39 40 var sunsetDate = new Date(results.sys.sunrise); 41 $('#sunset').text(sunsetDate.toLocaleTimeString()); 42 } 43 44 }); 45 } 46 }).fail(function () { 47 console.log("error getting location"); 48 }); 49} 50 51// Error callback 52 53function onWeatherError(error) { 54 console.log('code: ' + error.code + '\n' + 55 'message: ' + error.message + '\n'); 56} 57
Receive updated weather forecasts as you drive around
1 2// Watch your changing position 3 4function watchWeatherPosition() { 5 6 return navigator.geolocation.watchPosition 7 (onWeatherWatchSuccess, onWeatherError, { enableHighAccuracy: true }); 8} 9 10// Success callback for watching your changing position 11 12var onWeatherWatchSuccess = function (position) { 13 14 var updatedLatitude = position.coords.latitude; 15 var updatedLongitude = position.coords.longitude; 16 17 if (updatedLatitude != Latitude && updatedLongitude != Longitude) { 18 19 Latitude = updatedLatitude; 20 Longitude = updatedLongitude; 21 22 // Calls function we defined earlier. 23 getWeather(updatedLatitude, updatedLongitude); 24 } 25} 26
See where you are on a map
Both Bing and Google have map services. We'll use Google's. You'll need a key but it's free if you're just trying things out.
Add a reference to the maps service.
1 2 <script src="https://maps.googleapis.com/maps/api/js?key=Your_API_Key"></script> 3
Then, add code to use it.
1 2var Latitude = undefined; 3var Longitude = undefined; 4 5// Get geo coordinates 6 7function getMapLocation() { 8 9 navigator.geolocation.getCurrentPosition 10 (onMapSuccess, onMapError, { enableHighAccuracy: true }); 11} 12 13// Success callback for get geo coordinates 14 15var onMapSuccess = function (position) { 16 17 Latitude = position.coords.latitude; 18 Longitude = position.coords.longitude; 19 20 getMap(Latitude, Longitude); 21 22} 23 24// Get map by using coordinates 25 26function getMap(latitude, longitude) { 27 28 var mapOptions = { 29 center: new google.maps.LatLng(0, 0), 30 zoom: 1, 31 mapTypeId: google.maps.MapTypeId.ROADMAP 32 }; 33 34 map = new google.maps.Map 35 (document.getElementById("map"), mapOptions); 36 37 38 var latLong = new google.maps.LatLng(latitude, longitude); 39 40 var marker = new google.maps.Marker({ 41 position: latLong 42 }); 43 44 marker.setMap(map); 45 map.setZoom(15); 46 map.setCenter(marker.getPosition()); 47} 48 49// Success callback for watching your changing position 50 51var onMapWatchSuccess = function (position) { 52 53 var updatedLatitude = position.coords.latitude; 54 var updatedLongitude = position.coords.longitude; 55 56 if (updatedLatitude != Latitude && updatedLongitude != Longitude) { 57 58 Latitude = updatedLatitude; 59 Longitude = updatedLongitude; 60 61 getMap(updatedLatitude, updatedLongitude); 62 } 63} 64 65// Error callback 66 67function onMapError(error) { 68 console.log('code: ' + error.code + '\n' + 69 'message: ' + error.message + '\n'); 70} 71 72// Watch your changing position 73 74function watchMapPosition() { 75 76 return navigator.geolocation.watchPosition 77 (onMapWatchSuccess, onMapError, { enableHighAccuracy: true }); 78} 79
Find stores near you
You can use the same Google key for this.
Add a reference to the places service.
1 2<script src= 3"https://maps.googleapis.com/maps/api/js?key=Your_API_Key&libraries=places"> 4</script> 5
Then, add code to use it.
1 2var Map; 3var Infowindow; 4var Latitude = undefined; 5var Longitude = undefined; 6 7// Get geo coordinates 8 9function getPlacesLocation() { 10 navigator.geolocation.getCurrentPosition 11 (onPlacesSuccess, onPlacesError, { enableHighAccuracy: true }); 12} 13 14// Success callback for get geo coordinates 15 16var onPlacesSuccess = function (position) { 17 18 Latitude = position.coords.latitude; 19 Longitude = position.coords.longitude; 20 21 getPlaces(Latitude, Longitude); 22 23} 24 25// Get places by using coordinates 26 27function getPlaces(latitude, longitude) { 28 29 var latLong = new google.maps.LatLng(latitude, longitude); 30 31 var mapOptions = { 32 33 center: new google.maps.LatLng(latitude, longitude), 34 zoom: 15, 35 mapTypeId: google.maps.MapTypeId.ROADMAP 36 37 }; 38 39 Map = new google.maps.Map(document.getElementById("places"), mapOptions); 40 41 Infowindow = new google.maps.InfoWindow(); 42 43 var service = new google.maps.places.PlacesService(Map); 44 service.nearbySearch({ 45 46 location: latLong, 47 radius: 500, 48 type: ['store'] 49 }, foundStoresCallback); 50 51} 52 53// Success callback for watching your changing position 54 55var onPlacesWatchSuccess = function (position) { 56 57 var updatedLatitude = position.coords.latitude; 58 var updatedLongitude = position.coords.longitude; 59 60 if (updatedLatitude != Latitude && updatedLongitude != Longitude) { 61 62 Latitude = updatedLatitude; 63 Longitude = updatedLongitude; 64 65 getPlaces(updatedLatitude, updatedLongitude); 66 } 67} 68 69// Success callback for locating stores in the area 70 71function foundStoresCallback(results, status) { 72 73 if (status === google.maps.places.PlacesServiceStatus.OK) { 74 75 for (var i = 0; i < results.length; i++) { 76 77 createMarker(results[i]); 78 79 } 80 } 81} 82 83// Place a pin for each store on the map 84 85function createMarker(place) { 86 87 var placeLoc = place.geometry.location; 88 89 var marker = new google.maps.Marker({ 90 map: Map, 91 position: place.geometry.location 92 }); 93 94 google.maps.event.addListener(marker, 'click', function () { 95 96 Infowindow.setContent(place.name); 97 Infowindow.open(Map, this); 98 99 }); 100} 101 102// Error callback 103 104function onPlacesError(error) { 105 console.log('code: ' + error.code + '\n' + 106 'message: ' + error.message + '\n'); 107} 108 109// Watch your changing position 110 111function watchPlacesPosition() { 112 113 return navigator.geolocation.watchPosition 114 (onPlacesWatchSuccess, onPlacesError, { enableHighAccuracy: true }); 115} 116
See pictures of things around you
Digital photos can contain geo coordinates that identify where the picture was taken.
Use Flickr API's to find pictures that folks have taken near you. Like Google services, you'll need a key, but it's free if you just want to try things out.
1 2var Latitude = undefined; 3var Longitude = undefined; 4 5// Get geo coordinates 6 7function getPicturesLocation() { 8 9 navigator.geolocation.getCurrentPosition 10 (onPicturesSuccess, onPicturesError, { enableHighAccuracy: true }); 11 12} 13 14// Success callback for get geo coordinates 15 16var onPicturesSuccess = function (position) { 17 18 Latitude = position.coords.latitude; 19 Longitude = position.coords.longitude; 20 21 getPictures(Latitude, Longitude); 22} 23 24// Get pictures by using coordinates 25 26function getPictures(latitude, longitude) { 27 28 $('#pictures').empty(); 29 30 var queryString = 31 "https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=Your_API_Key&lat=" 32 + latitude + "&lon=" + longitude + "&format=json&jsoncallback=?"; 33 34 $.getJSON(queryString, function (results) { 35 $.each(results.photos.photo, function (index, item) { 36 37 var photoURL = "http://farm" + item.farm + ".static.flickr.com/" + 38 item.server + "/" + item.id + "_" + item.secret + "_m.jpg"; 39 40 $('#pictures').append($("<img />").attr("src", photoURL)); 41 42 }); 43 } 44 ); 45} 46 47// Success callback for watching your changing position 48 49var onPicturesWatchSuccess = function (position) { 50 51 var updatedLatitude = position.coords.latitude; 52 var updatedLongitude = position.coords.longitude; 53 54 if (updatedLatitude != Latitude && updatedLongitude != Longitude) { 55 56 Latitude = updatedLatitude; 57 Longitude = updatedLongitude; 58 59 getPictures(updatedLatitude, updatedLongitude); 60 } 61} 62 63// Error callback 64 65function onPicturesError(error) { 66 67 console.log('code: ' + error.code + '\n' + 68 'message: ' + error.message + '\n'); 69} 70 71// Watch your changing position 72 73function watchPicturePosition() { 74 75 return navigator.geolocation.watchPosition 76 (onPicturesWatchSuccess, onPicturesError, { enableHighAccuracy: true }); 77} 78
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/apache/.github/.github/SECURITY.md:1
- Info: Found linked content: github.com/apache/.github/.github/SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/apache/.github/.github/SECURITY.md:1
- Info: Found text in security policy: github.com/apache/.github/.github/SECURITY.md:1
Reason
1 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
Reason
Found 21/28 approved changesets -- score normalized to 7
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/android.yml:79: update your workflow using https://app.stepsecurity.io/secureworkflow/apache/cordova-plugin-geolocation/android.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/android.yml:80: update your workflow using https://app.stepsecurity.io/secureworkflow/apache/cordova-plugin-geolocation/android.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/android.yml:83: update your workflow using https://app.stepsecurity.io/secureworkflow/apache/cordova-plugin-geolocation/android.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/chrome.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/apache/cordova-plugin-geolocation/chrome.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/chrome.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/apache/cordova-plugin-geolocation/chrome.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ios.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/apache/cordova-plugin-geolocation/ios.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ios.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/apache/cordova-plugin-geolocation/ios.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/apache/cordova-plugin-geolocation/lint.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/apache/cordova-plugin-geolocation/lint.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/android.yml:101
- Warn: npmCommand not pinned by hash: .github/workflows/android.yml:107
- Warn: npmCommand not pinned by hash: .github/workflows/chrome.yml:60
- Warn: npmCommand not pinned by hash: .github/workflows/chrome.yml:66
- Warn: npmCommand not pinned by hash: .github/workflows/ios.yml:88
- Warn: npmCommand not pinned by hash: .github/workflows/ios.yml:94
- Info: 0 out of 9 GitHub-owned GitHubAction dependencies pinned
- Info: 3 out of 3 third-party GitHubAction dependencies pinned
- Info: 4 out of 10 npmCommand dependencies pinned
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/android.yml:1
- Warn: no topLevel permission defined: .github/workflows/chrome.yml:1
- Warn: no topLevel permission defined: .github/workflows/ios.yml:1
- Warn: no topLevel permission defined: .github/workflows/lint.yml:1
- Info: no jobLevel write permissions found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 25 are checked with a SAST tool
Score
4.9
/10
Last Scanned on 2025-02-03
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreGathering detailed insights and metrics for cordova-plugin-geolocation