Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CIS-CAT API requests #142

Merged
merged 3 commits into from
Aug 6, 2018
Merged

Add CIS-CAT API requests #142

merged 3 commits into from
Aug 6, 2018

Conversation

mgmacias95
Copy link
Contributor

Hello team,

This PR implements #87.

Some examples:

# curl -u foo:bar "localhost:55000/ciscat/001/results?pretty&benchmark=CIS+Ubuntu+Linux+16.04+LTS+Benchmark"
{
   "error": 0,
   "data": {
      "totalItems": 2,
      "items": [
         {
            "profile": "xccdf_org.cisecurity.benchmarks_profile_Level_2_-_Server",
            "scan": {
               "id": 474792628,
               "time": "2018-08-03T12:44:56.180-07:00"
            },
            "notchecked": 36,
            "pass": 104,
            "benchmark": "CIS Ubuntu Linux 16.04 LTS Benchmark",
            "unknown": 1,
            "score": 57,
            "error": 0,
            "fail": 79
         },
         {
            "profile": "xccdf_org.cisecurity.benchmarks_profile_Level_1_-_Workstation",
            "scan": {
               "id": 474792628,
               "time": "2018-08-03T12:45:29.037-07:00"
            },
            "notchecked": 71,
            "pass": 96,
            "benchmark": "CIS Ubuntu Linux 16.04 LTS Benchmark",
            "unknown": 0,
            "score": 64,
            "error": 0,
            "fail": 53
         }
      ]
   }
}
# curl -u foo:bar "localhost:55000/ciscat/001/results?pretty&benchmark=CIS+Ubuntu+Linux+16.04+LTS+Benchmark&offset=1"
{
   "error": 0,
   "data": {
      "totalItems": 2,
      "items": [
         {
            "profile": "xccdf_org.cisecurity.benchmarks_profile_Level_1_-_Workstation",
            "scan": {
               "id": 474792628,
               "time": "2018-08-03T12:45:29.037-07:00"
            },
            "notchecked": 71,
            "pass": 96,
            "benchmark": "CIS Ubuntu Linux 16.04 LTS Benchmark",
            "unknown": 0,
            "score": 64,
            "error": 0,
            "fail": 53
         }
      ]
   }
}
# curl -u foo:bar "localhost:55000/experimental/ciscat/results?pretty&profile=xccdf_org.cisecurity.benchmarks_profile_Level_1"
{
   "error": 0,
   "data": {
      "totalItems": 1,
      "items": [
         {
            "profile": "xccdf_org.cisecurity.benchmarks_profile_Level_1",
            "scan": {
               "id": 1873075658,
               "time": "2018-08-03T12:44:05.936-07:00"
            },
            "notchecked": 173,
            "pass": 78,
            "benchmark": "CIS Microsoft Windows 10 Enterprise Release 1607 Benchmark",
            "unknown": 3,
            "score": 26,
            "agent_id": "002",
            "error": 0,
            "fail": 224
         }
      ]
   }
}

Best regards,
Marta

@chemamartinez chemamartinez merged commit f8740d7 into 3.5 Aug 6, 2018
@chemamartinez chemamartinez deleted the dev-ciscat-requests branch August 6, 2018 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants