
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Sync public facebook page events to Google Calendar.
Before beginning you will need to create and configure a facebook app and use it to acquire a page access token for Graph API.
You will also need to set up a Google service account to acquire a credentials file to authenticate with Google APIs.
Install fest
using pip:
pip install fest
Use clients for facebook's Graph API and Google's Calendar API to create FacebookPage
and GoogelCalendar
objects, then synchronize:
import facebook
from googleapiclient import discovery
import fest
# Connect to Graph API & Calendar API
graphapi = facebook.GraphAPI('<facebook-page-token>')
calendarapi = discovery.build('calendar', 'v3', cache_discovery=False)
# Get Page/Calendar objects
page = fest.FacebookPage(graphapi, '<facebook-page-name-or-id>')
gcal = fest.GoogleCalendar(calendarapi, '<google-calendar-id>')
# Sync Calendar <= Page
req = gcal.sync(page, time_filter='upcoming')
res = req.execute()
Several methods of deployment are provided.
A pair of terraform modules module are provided to deploy this tool as a Lambda function on AWS and invoke it on a cron using CloudWatch.
# WARNING Be extremely cautious when using secret versions in terraform
# NEVER store secrets in plaintext and encrypt your remote state
# I recommend applying the secret versions in a separate workspace with no remote backend,
# or curating them manually in the console or AWS CLI.
resource "aws_secretsmanager_secret_version" "facebook" {
secret_id = module.facebook_gcal_sync.facebook_secret.id
secret_string = "my-facebook-app-token"
}
resource "aws_secretsmanager_secret_version" "google" {
secret_id = module.facebook_gcal_sync.google_secret.id
secret_string = file("./path/to/my/svc/acct/creds.json")
}
module facebook_gcal_sync {
source = "amancevice/facebook-gcal-sync/aws"
version = "~> 1.0"
facebook_page_id = "<facebook-page-id>"
facebook_secret_name = "facebook/my-app"
google_calendar_id = "<google-calendar-id>"
google_secret_name = "google/my-svc-acct"
}
A terraform module module is provided to deploy this tool as a Heroku application.
module facebook_gcal_sync {
source = "amancevice/facebook-gcal-sync/heroku"
app_name = "<unique-app-name>"
facebook_page_id = "<facebook-page-id>"
google_calendar_id = "<google-calendar-id>"
google_credentials_file = "<path-to-google-service-credentials>"
facebook_page_token = "<facebook-page-access-token>"
}
Alternatively, deploy with one click:
FAQs
Facebook Events Sync
We found that fest demonstrated a healthy version release cadence and project activity because the last version was released less than 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.