Code Monkey home page Code Monkey logo

data-model's People

Contributors

a-u-h-g avatar aiwilliams avatar austinkelleher avatar ceelias avatar ctdio avatar dependabot[bot] avatar edreyer1 avatar electricgull avatar erichs avatar erkangz avatar eyadmba avatar henrymgarrett avatar i5o avatar jablonnc avatar jzolo22 avatar kevincasey1222 avatar mdaum avatar mknoedel avatar ndowmon avatar nick-ncsu avatar rwaterman avatar softwarewright avatar sounil avatar vdubber avatar zemberdotnet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

data-model's Issues

Create `FirewallRule` entity class

Historically, Firewall Rules have been created as edges between Firewalls and "The Internet". Properties such as Allow/Deny, startIp/endIp, protocol, etc. have been properties on these edges, and to query in J1QL, one must build a query like FIND Firewall THAT (ALLOWS|DENIES) as firewallRule * return firewallRule.*.

Firewall rules aren't always related to Firewalls, though, as is the case with Azure SQL Servers (who have firewall rules with fewer properties, omitting Allows/Denies, Protocol, and other typical properties). I think it would be best to create a FirewallRule entity class.

Generate TypeScript type definitions from JSON schema

There are types in the integration-sdk coded to reflect the types defined by the schemas in this repository. Likely other projects are doing something similar.

It would be ideal to have a package, born out of this repo, that provides TypeScript type definitions for the schemas of the data model. This project is already shipping as an NPM module, so it is convenient to include the generated types in that package.

Unknown format "ip" in schemas

    console.warn node_modules/ajv/lib/dotjs/format.js:58
      unknown format "ip" ignored in schema at path "#/allOf/1/properties/ipAddress"

Add "ISSUED" relationship class

ISSUED will represent a relationship between an authoritative entity (e.g. user) and some resource that the authoritative entity issued to another entity (e.g. a token).

Example:

my_user ISSUED the_token

Improve `type` for `webLink` properties

Example of a case that causes the schema validation to fail:

https://abc.com/<abc>

I think we should consider a more permission type that matches URLs with or without a protocol.

Inconsistency in "Function" "memorySize" data type and property needs clarification of memory unit

See: https://github.com/JupiterOne/data-model/blob/master/src/schemas/Function.json#L24

Problem

Currently, the Function memorySize property has an inconsistent type between the data model and the AWS integration. In the data-model, the type is listed as a "string" and in the AWS integration, the data type is a "number". Additionally, it's unclear from the name of the property what the memory unit is (e.g. mb, gb, etc.).

Proposal

  • Change the data type to a number
  • Rename the property to have unit clarity. I think we should standardize on a memory unit size to make it clear in the property name and description fields what the unit is. Google Cloud makes the property name very distinct: availableMemoryMb. Thoughts on updating the property field to match Google Cloud?

`DataObject` `classification` field should accept `null`

This is inconsistent with other classification types in the data model

Example:

{
  "_class": [
    "DataObject"
  ],
  "_key": "my_testing_key",
  "_type": "my_testing_type",
  "name": "John",
  "displayName": "Wick",
  "classification": null
}

Consider option to allow `null` for any graph object property during validation

Sometimes, the data provider/API of third party systems returns a null value for properties. It doesn't seem that Ajv provides for a global configuration of allowing nullable properties, we'd have to make the schemas have nullable on every single property, or at least on those where we want to allow null.

During work on the PagerDuty integration, it seemed that a better course was to change createIntegrationEntity to avoid transferring null values to the target entity. This seemed at the time as essentially the same behavior as not receiving the property at all from the provider.

There's been another run in where the integration was using assign to directly set null and had to work around validation by value ? value : undefined.

We could consider making https://github.com/JupiterOne/data-model/blob/master/src/validateEntityWithSchema.ts#L7 support an option to remove null value properties from the graph object so that they're treated as undefined.

`Control` entity class not allowing array of `function`

Example that should work, but throws a validation error:

{
  _type: 'some-type-of-thing',
  _class: 'Control',
  _key: 'some-key-unique',
  name: 'Name of Thing',
  displayName: 'Name of Thing',
  function: ['appsec', 'bug-bounty', 'pen-test']
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.