Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@anonymitybot/is-educational-email-domain
Advanced tools
Check if an email domain belongs to an educational instutition
Check if an email domain belongs to an educational institution.
We offer AnonymityBot for free for educational workspaces but couldn't find an efficient way to detect email domains of educational institutions.
Why not?
We’ve been students and lecturers ourselves and personally felt the communicational hardships affecting both sides (the fear of being ridiculed for asking a question, the moment no one asks questions - not knowing if they got it, etc.) and therefore think that more software should offer Pro Bono tiers for educational purposes.
For this reason, we decided to open source our software that automatically detects if an email domain belongs to an educational institution.
You can read more here.
hasCommonEducationalTld(domain)
We call a TLD Common Educational TLD
if it is either .edu
, .edu.xx
or
.ac.xx
and was fetched from
publicsuffix.org.
hasAdhocEducationalTld(domain)
Some institutions don't use edu
or ac
TLDs, and (usually) use their own
country code. For instance, University of Oslo has an email
domain for each department - math.uio.no
, fys.uio.no
- in order to capture
all such departments we simply check for uio.no
.
isEducationalEmailDomain(domain)
Combines hasCommonEducationalTld
and hasAdhocEducationalTld
:
const isEducationalEmailDomain = (domain) =>
hasCommonEducationalTld(domain) || hasAdhocEducationalTld(domain);
See ./assets.
Install with yarn add @anonymitybot/is-educational-email-domain
:
const {
isEducationalEmailDomain,
hasAdhocEducationalTld,
hasCommonEducationalTld,
} = require('@anonymitybot/is-educational-email-domain');
(async () => {
hasCommonEducationalTld('stanford.edu'); // true
hasCommonEducationalTld('u-tokyo.ac.jp'); // true
hasCommonEducationalTld('cuhk.edu.cn'); // true
hasCommonEducationalTld('bla.cc'); // false - .ac is a ccTLD
hasAdhocEducationalTld('math.ethz.cz'); // true - etch.cz is an ad-hoc educational domain
hasAdhocEducationalTld('stanford.edu'); // false - .edu is a common educational tld (but not an ad-hoc one)
isEducationalEmailDomain('stanford.edu'); // true
isEducationalEmailDomain('math.ethz.cz'); // true
isEducationalEmailDomain('bla.cc'); // false - .ac is a ccTLD
})()
FAQs
Check if an email domain belongs to an educational instutition
We found that @anonymitybot/is-educational-email-domain 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.