h3

package module
v0.0.0-...-e0c41f3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2018 License: AGPL-3.0 Imports: 10 Imported by: 0

README

h3

Horadric Cube

Description

h3 is a library and command line utility that is attempting to standardize information security skill assessment. Frankly, I don't know exactly what this is going to look like but I know it's something that's desparately needed in our field. The goals of this are to:

  • Objectively score technical competency in many areas critical to information security work
  • Provide rubrics to determine level of expertise in any given competency
  • Enable professionals, mentors, and employers to recommend training based on deficiencies identified in the h3 model

Installation

go get github.com/gen0cide/h3/cmd/h3

Model & Scoring

Coming Soon

Shoutouts

  • @ahhh
  • @vyrus001
  • @hecfblog

Documentation

Index

Constants

View Source
const Version = "0.0.1"

Version defines the version of the h3 package

Variables

View Source
var (
	// ErrInvalidLevel is thrown when a level could not be parsed from it's string
	ErrInvalidLevel = errors.New("invalid level supplied")

	// ValidLevels is a map of valid levels and their descriptions
	ValidLevels = map[Level]string{
		Unfamiliar: "Subject was unfamiliar with the subject",
		Beginner:   "Subject had a beginner level understanding of the subject",
		Moderate:   "Subject had a moderate level understanding of the subject",
		Advanced:   "Subject had an advanced level understanding of the subject",
		Expert:     "Subject had an expert level understanding of the subject",
	}
)

Functions

This section is empty.

Types

type Element

type Element struct {
	Name        string              `json:"name"`
	CN          string              `json:"cn"`
	Path        string              `json:"path"`
	Type        string              `json:"type"`
	Title       string              `json:"title,omitempty"`
	Description string              `json:"description,omitempty"`
	Weight      int                 `json:"weight,omitempty"`
	Parent      *Element            `json:"-"`
	Universe    *Universe           `json:"-"`
	Children    map[string]*Element `json:"children,omitempty"`
	UserScore   Level               `json:"user_score,omitempty"`
	Rubric      Rubric              `json:"rubric,omitempty"`
	Tree        gotree.Tree         `json:"-"`
}

Element describes a single leaf in the skill tree

func (*Element) AbsPath

func (e *Element) AbsPath() string

AbsPath returns an elements qualified path from root

func (*Element) Count

func (e *Element) Count() int

Count returns the number of elements in this leaf

func (*Element) NewChild

func (e *Element) NewChild(name string) *Element

NewChild creates a new element leaf from an element

func (*Element) Percent

func (e *Element) Percent() float64

Percent calculates the delta between max score of this element and the user percent

func (*Element) Score

func (e *Element) Score() int

Score calculates the user supplied score of this element (or it's tree)

type Level

type Level int

Level represents the skill level that can be assigned to a skill in the tree

const (
	// Unfamiliar means the user had zero knowledge of the topic
	Unfamiliar Level = iota

	// Beginner means the user had a beginner level understanding of the topic
	Beginner

	// Moderate means the user had a moderate level understanding of the topic
	Moderate

	// Advanced means the user had an advanced level understanding of the topic
	Advanced

	// Expert means the user had an expert level understanding of the topic
	Expert
)

func LevelFromWord

func LevelFromWord(w string) (Level, error)

LevelFromWord attempts to parse a Level from it's string representation

func (Level) MarshalJSON

func (l Level) MarshalJSON() ([]byte, error)

MarshalJSON implements the JSONMarshaler for the Level type

func (Level) String

func (l Level) String() string

String implements the Stringer interface for Level

func (Level) UnmarshalJSON

func (l Level) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the JSONUnmarshaler for the Level type

type Rubric

type Rubric map[Level]string

Rubric represents a scoring rubric for a specific skill tree element

func EmptyRubric

func EmptyRubric() Rubric

EmptyRubric initializes an empty rubric type

func (Rubric) MarshalJSON

func (r Rubric) MarshalJSON() ([]byte, error)

MarshalJSON implements the JSONMarshaler for the Rubric type

func (Rubric) UnmarshalJSON

func (r Rubric) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the JSONUnmarshaler for the Rubric type

type Universe

type Universe struct {
	Elms     []*Element          `json:"-"`
	ByPath   map[string]*Element `json:"-"`
	TopLevel map[string]*Element `json:"universe"`
	Tree     gotree.Tree         `json:"-"`
}

Universe manages the top level skill tree

func NewUniverse

func NewUniverse() *Universe

NewUniverse makes a new universe.

func (*Universe) NewTopLevelElement

func (u *Universe) NewTopLevelElement(name string) *Element

NewTopLevelElement creates a new top level element in the universe

func (*Universe) Normalize

func (u *Universe) Normalize() error

Normalize attempts to normalize the fields within the universe

func (*Universe) ToTable

func (u *Universe) ToTable() [][]string

ToTable returns a two dimensional table

Directories

Path Synopsis
cmd
h3

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL