npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

uguisu

v1.0.0

Published

![icon](https://user-images.githubusercontent.com/605953/74091901-6d0eef80-4b00-11ea-88c4-b4ae90cd3331.png)

Downloads

1

Readme

Uguisu Build Status

icon

uguisu is AWS CDK Construct to monitor suspicious activity regarding AWS resource. uguisu watches CloudTrail logs and monitors changes of AWS resources. It also have rules to detect an event of interest regarding security. A part of rules is based on AWS CIS benchmark. uguisu notifies detail to Slack channel when detecting an event of interest like following.

By the way, the name of the tool comes from uguisubari (鶯張り) that is floors to alarm someone is incoming by a chirping sound when walked upon. In English, it is called Nightingale floor. See wikipedia for more detail.

Rules

  • Based on AWS CIS Benchmark
    • 3.1: Unauthorized API calls monitoring
    • 3.2: Management Console sign-in without MFA
    • 3.3: Usage of root account
    • 3.4: IAM policy changes
    • 3.5: CloudTrail configuration changes
    • 3.6: AWS Management Console authentication failures
    • 3.7: Disabling or scheduled deletion of customer created CMKs
    • 3.8: S3 bucket policy changes
    • 3.9: AWS Config configuration changes
    • 3.10: Security group changes
    • 3.11: Network Access Control Lists (NACL)
    • 3.12: Changes to network gateways
    • 3.13: Route table changes
    • 3.14: VPC changes
  • Original
    • EC2: Create and destroy an instance
    • RDS: Create and destroy an instance
    • ACM: Change a certification

How to use

0. Prerequisites

CDK tools

See official getting started page. https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html. Please install CDK tools.

Slack Incoming Webhook URL

See https://api.slack.com/messaging/webhooks to create your Incoming Webhook URL. You can get URL like this:

https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

Setup CloudTrail logging to S3 and SNS topic

Also CloudTrail logs are required to monitor AWS resources. uguisu requires not only CloudTrail logs but also SNS topic to notify s3:ObjectCreated:* event from S3 bucket.

  • Enable CloudTrail and logging to S3: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-a-trail-using-the-console-first-time.html
  • Change S3 bucket policy: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-s3-bucket-policy-for-cloudtrail.html
  • Configure S3 event notification to SNS: https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html

1. Create your new CDK project

$ mkdir your-cdk-app
$ cd your-cdk-app
$ cdk init --language typescript

2. Install Uguisu module

$ npm install uguisu

3. Write your construct

Put construct code to bin/your-cdk-app.ts like following. Please replace s3BucketName , snsTopicARN and slackWebhookURL.

#!/usr/bin/env node
import "source-map-support/register";
import * as cdk from "@aws-cdk/core";
import { UguisuStack } from "uguisu";

const app = new cdk.App();
new UguisuStack(app, "secops-uguisu", {
  s3BucketName: "your-cloudtrail-logs-bucket",
  snsTopicARN: "arn:aws:sns:ap-northeast-1:1234567890:your-cloudtrail-event-topic",
  slackWebhookURL: "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX",
});

Construct options

  • You can set lambdaRoleARN if you do not want to create a new ServiceRole for uguisu by CDK
  • You can disable specific rule(s) by putting disableRules
    • e.g. disableRules: "aws_cis_3.4,aws_cis_3.5"
    • Rule IDs can be found from here

4. Deploy your construct

$ npm run build
$ cdk deploy

License

MIT License