Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Ruby wrapper for the NOAA weather API.
Add this line to your application's Gemfile:
gem 'noaa_weather_client'
And then execute:
$ bundle
Or install it yourself as:
$ gem install noaa_weather_client
It is important to cache a copy of the available stations for frequent use as the stations response is quite large NOAA does not appreciate repeated calls.
# cache a copy of stations and store in memory, file, etc.
stations = client.weather_stations
# current_observations
client.current_observations(some_lat, some_lon, stations: stations)
# nearest_weather_station
client.nearest_weather_station(some_lat, some_lon, stations: stations)
In my experience, the best observations tend to come from the ICAO(mostly airports) stations. There are many other stations - typically in cities and near the coast, but the observations tend to be partial and intermittent.
# filter by station type
filter = NoaaWeatherClient::StationFilters.icao
client.nearest_weather_station(some_lat, some_lon, stations: stations, filter: filter)
NOAA provides a service to resolve postal codes to a coordinate.
# convert postal code to coordinate
coordinate = client.postal_code_to_coordinate(90210)
coordinate.latitude #=> 34.0995
coordinate.longitude #=> -118.414
# create a client instance
client = NoaaWeatherClient.build_client
# all weather stations
client.weather_stations
# locate the nearest weather station
client.nearest_weather_station(34.0995, -118.414)
# 7 day forecast
client.forecast_by_day(34.0995, -118.414)
# current observations
client.current_observations(34.0995, -118.414)
$ noaa_weather_client -p 65804
#=> 34.0995 -118.414
# current observations
$ noaa_weather_client 34.0995 -118.414
# include 7 day forecast
$ noaa_weather_client -f 34.0995 -118.414
# resolve postal code and pipe args
$ noaa_weather_client -p 90210 | xargs noaa_weather_client -f
Contributions are always welcome. A few notes:
To propose a change or fix a bug:
FAQs
Unknown package
We found that noaa_weather_client 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.