Documentation ¶
Overview ¶
Copyright © 2020 Abhay Bhargav
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright © 2020 Abhay Bhargav ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright © 2020 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2020 Abhay Bhargav ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
Copyright © 2020 Abhay Bhargav ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright © 2020 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2020 Abhay Bhargav ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright © 2020 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2020 Abhay Bhargav ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- func ChangeTokenInCred(token string)
- func Execute()
- func IsConfigured() bool
- func MakeRequest(url string, method string, configValue ConfigObj, request []byte) *http.Response
- type AbuseCaseParams
- type AbuseRequest
- type AbuserStory
- type AbuserStoryCreate
- type AbuserStoryGetResponse
- type CascadingFeatureObject
- type ChangePassword
- type ConfigObj
- type Feature
- type FeatureRequest
- type GetUserStoryRequest
- type JSONConfig
- type LoginResponse
- type ProjectRequest
- type ProjectResponse
- type ScenarioReference
- type SecurityTestCase
- type TestCaseCreate
- type TestCaseGetResponse
- type TestCaseRequest
- type ThreatScenario
- type ThreatScenarioCreate
- type ThreatScenarioGetResponse
- type ThreatScenarioRequest
- type UserStoryResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeTokenInCred ¶
func ChangeTokenInCred(token string)
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func IsConfigured ¶
func IsConfigured() bool
Types ¶
type AbuseCaseParams ¶
type AbuseRequest ¶
type AbuseRequest struct { Name string `json:"short_name"` Description string `json:"description"` UserStory string `json:"feature"` ThreatScenarios []ThreatScenarioRequest `json:"scenarios"` }
type AbuserStory ¶
type AbuserStory struct { Name string `yaml:"name"` Description string `yaml:"description"` Threat_scenarios []ThreatScenario `yaml:"threat_scenarios"` }
type AbuserStoryCreate ¶
type AbuserStoryCreate struct { Name string Created bool Feature string ThreatScenarios []ThreatScenario }
type AbuserStoryGetResponse ¶
type AbuserStoryGetResponse struct { Data []struct { ShortName string `json:"short_name"` Description string `json:"description"` } `json:"data"` }
func GetAbuserStory ¶
func GetAbuserStory(params AbuseCaseParams) AbuserStoryGetResponse
GetAbuserStory - Generic Function to get abuser stories for a user story or a specific abuser story
type CascadingFeatureObject ¶
type CascadingFeatureObject struct { Name string `json:"short_name"` Description string `json:"description"` AbuseCases []AbuseRequest `json:"abuse_cases"` }
type ChangePassword ¶
type ChangePassword struct {
// contains filtered or unexported fields
}
type ConfigObj ¶
type ConfigObj struct {
// contains filtered or unexported fields
}
func GetJsonConfiguration ¶
func GetJsonConfiguration() ConfigObj
type Feature ¶
type Feature struct { ObjectType string `yaml:"objectType"` Name string `yaml:"name"` Description string `yaml:"description"` Abuse_cases []AbuserStory `yaml:"abuse_cases"` }
type FeatureRequest ¶
type GetUserStoryRequest ¶
type JSONConfig ¶
type JSONConfig struct { Host string `json:"host"` Port int32 `json:"port"` Email string `json:"email"` Token string `json:"token"` }
Note, when you want to export a struct and use it to write, you need to capitalize the attributes
type LoginResponse ¶
type ProjectRequest ¶
type ProjectRequest struct {
Name string `json:"name"`
}
type ProjectResponse ¶
type ScenarioReference ¶
type SecurityTestCase ¶
type TestCaseCreate ¶
type TestCaseGetResponse ¶
type TestCaseGetResponse struct {
Data []TestCaseRequest `json:"data"`
}
func GetTestCase ¶
func GetTestCase(scenario string, config ConfigObj) TestCaseGetResponse
GetTestCase - Generic Function to get TestCases for a given scenario or a specific Test Case
type TestCaseRequest ¶
type ThreatScenario ¶
type ThreatScenario struct { Name string `yaml:"name"` ScenarioType string `yaml:"type"` Description string `yaml:"description"` Vul_name string `yaml:"vul_name"` Severity int `yaml:"severity"` Cwe int32 `yaml:"cwe"` Reference ScenarioReference `yaml:"reference"` Test_cases []SecurityTestCase `yaml:"test-cases"` }
type ThreatScenarioCreate ¶
type ThreatScenarioCreate struct { Name string //Threat Scenario name Created bool //Whether it was successfully created or not TestCases []SecurityTestCase //List of test cases, if its an inline object }
type ThreatScenarioGetResponse ¶
type ThreatScenarioGetResponse struct {
Data []ThreatScenarioRequest `json:"data"`
}
func GetThreatScenario ¶
func GetThreatScenario(abuse_case string, config ConfigObj) ThreatScenarioGetResponse
GetThreatScenario - Generic function to get ThreatScenarios for an Abuser Story or a Specific Threat Scenario
type ThreatScenarioRequest ¶
type ThreatScenarioRequest struct { Name string `json:"name"` Feature string `json:"feature"` AbuserStory string `json:"abuser_story"` Description string `json:"description"` ScenarioType string `json:"type"` RepoName string `json:"repo_name"` VulName string `json:"vul_name"` Cwe int32 `json:"cwe"` Severity int `json:"severity"` TestCases []TestCaseRequest `json:"test_cases"` Categories []string `json:"categories"` }
type UserStoryResponse ¶
type UserStoryResponse struct { Data struct { GetUserStoryRequest } `json:"data"` }