
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
securedata
Advanced tools
A library that allows for easy reading/writing of settings across repositories, as well as mail and logging.
logger each timesettings.json/path/to/securedata/log by default python3 -m pip install securedata
securedata config
To choose where settings.json is stored, use securedata config
To choose where logs will be stored, edit settings.json and set path -> log to the full path to the log folder. (in other words, {"path": "log": "/path/to/folder"})
settings.json -> path -> securedata -> {sync-pull/sync-push}, like this example:# example only; these commands will be unique to your cloud syncing setup
# if set, pull commands will be used before loading `settings.json` if `sync` is True; pull and push commands will be used before and after `setItem` if `sync` is True
{
"path": {
"securedata": {
"sync-pull": "rclone sync Dropbox:SecureData /home/{username}/securedata",
"sync-push": "rclone copy /home/{username}/securedata Dropbox:SecureData"
}
}
}
setItem("test", "123") # will not sync, because `sync` is not true
setItem("test", "123", sync=True) # will sync if the properties above are set
getItem("test") # will not pull from cloud before returning, because `sync` is not true
getItem("test", sync=True) # will pull from cloud before returning
securedata edit shopping from the terminal
securedata.editFile("shopping"), rather than securedata.editFile("/home/{username}/path/to/shopping.md")value (full path to the file)
sync set to true# example only; these commands will be unique to your cloud syncing setup
{
"path": {
"edit": {
"shopping": {
"value": "/home/{username}/path/to/shopping.md",
"sync": true
},
"todo": {
"value": "/home/{username}/path/to/todo.md",
"sync": false
}
"sync-pull": "rclone sync Dropbox:SecureData /home/{username}/securedata",
"sync-push": "rclone copy /home/{username}/securedata Dropbox:SecureData"
}
}
}
smtplib.settings.json, add the email object to make your settings file look like this example:{
"email": {
"from": "throwaway@example.com",
"from_pw": "example",
"from_name": "Raspberry Pi",
"to": "destination@protonmail.com",
"smtp_server": "example.com",
"imap_server": "example.com",
"port": 123
}
}
setItemfrom securedata import securedata
securedata.setItem("employee", "Tyler", "salary", 7.25)
results in this structure in settings.json:
{
"employee": {
"Tyler": {
"salary": 7.25
}
}
}
getItemfrom securedata import securedata
print(securedata.getItem("employee", "Tyler", "salary")) # given example settings.json above
> python3 test.py
> 7.25
editFilefrom securedata import securedata
# if setItem("path", "edit", "shopping", "/path/to/shopping.md") has been called, this will edit the file
# assigned to that shortcut.
# opens file in Vim, saves upon exit
securedata.editFile("shopping")
# or you can edit a file directly...
securedata.editFile("/path/to/shopping.md")
# set path -> edit -> sync-pull and path -> edit -> sync-push to specify commands that should be run for cloud integration.
mail
from securedata import mail
mail.send('Test Subject', 'Test Body')
log
from securedata import securedata
# writes to a file named LOG_DAILY YYYY-MM-DD in the default log folder (or securedata.getItem('path', 'log')) inside a YYYY-MM-DD folder
securedata.log("Dear Diary...")
securedata.log("This function hit a breakpoint", level="debug")
securedata.log("Looks like the server is on fire", level="critical")
securedata.log("This is fine", level="info")
# writes to a file named LOG_TEMPERATURE
securedata.log("30", logName="LOG_TEMPERATURE")
# writes to a file named LOG_TEMPERATURE in /home/{username}/weather
securedata.log("30", logName="LOG_TEMPERATURE", filePath="/home/{username}/weather")
# format
# 2021-12-29 19:29:27,896 — INFO — 30
FAQs
Easily manage data storage and logging across repos
We found that securedata 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.