Skip to content
This repository has been archived by the owner on Sep 14, 2019. It is now read-only.

Compliance checking #14

Closed
wants to merge 5 commits into from
Closed

Compliance checking #14

wants to merge 5 commits into from

Conversation

jvehent
Copy link
Contributor

@jvehent jvehent commented May 19, 2014

This set of patches add API code to evaluate compliance. This is a work in progress, not ready to merge yet.

@jvehent
Copy link
Contributor Author

jvehent commented May 21, 2014

After some discussions with @netantho, we're gonna go with an output format similar to the one below:

{
    "timestamp": "2014-05-13T21:23:27.536843Z",
    "target": "memcache1.stage.example.net",
    "policy": {
      "name": "system",
      "url": "https: //mana.mozilla.org/wiki/display/SECURITY/System+Security+Policy",
      "level": "medium"
    },
    "check": {
      "description": "compliance check for openssh",
      "name": "check for verbose logging (logs fingerprints)",
      "location": "/etc/ssh/sshd_config",
      "test": {
        "type": "regex",
        "value": "(?i)^loglevelverbose$"
      }
    },
    "compliance": true,
    "link": "http://localhost:1664/api/v1/command?commandid=6013023743752837160&options=verifycompliance"
}

Some processing will be requiring to go from one commands containing multiple checks, to one check per json file. Below is a query that does the initial data retrieval from the DB, before manipulation:

SELECT commands.finishtime as timestamp, agents.name as target,
  actions.name as name, actions.description->>'policy' as policy,
  CAST(commands.results AS TEXT)
FROM commands
  INNER JOIN actions ON (commands.actionid = actions.id)
  INNER JOIN agents ON (commands.agentid = agents.id)
WHERE threat->>'family' = 'compliance';

@jvehent jvehent mentioned this pull request May 30, 2014
@jvehent
Copy link
Contributor Author

jvehent commented May 30, 2014

github is confused. the set of patches shown here are from the master branch, not sure what happened but this got merged in #15 anyway.

@jvehent jvehent closed this May 30, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant