Пример #1
0
        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="app"></param>
        /// <param name="settings"></param>
        /// <param name="filterType"></param>
        /// <param name="itemType"></param>
        /// <param name="issueTypeOrGroup"></param>
        public IssueListCall(ApplicationWithAttributes app, ASMRestSettings settings, IssueFilterType filterType = IssueFilterType.None,
                             string issueTypeOrGroup = "",
                             string itemType         = "Item Type=Group,Item Type=Vulnerability,Item Type=Highest Threat,Item Type=Unspecified")
            : base(settings)
        {
            _app = app;
            _issueTypeOrGroup = Utils.HtmlDecode(issueTypeOrGroup);

            if (this.ASMRestSettings.ServerVersion.CompareTo(new Version("9.0.2.0")) >= 0)
            {
                _issueQuery += ",Status=New";
            }

            if (!String.IsNullOrWhiteSpace(_issueTypeOrGroup))
            {
                if (filterType == IssueFilterType.Group)
                {
                    _issueQuery += ",Item Type=Child,Issue Group={1}";
                }
                else
                {
                    _issueQuery += "," + itemType + ",Issue Type={1}";
                }
            }
        }
Пример #2
0
 public ImportCall(string appId, string scannerId, ASMRestSettings settings) : base(settings)
 {
     _appId     = appId;
     _scannerId = scannerId;
 }
Пример #3
0
 public IssueCall(ApplicationWithAttributes app, ASMRestSettings settings) : base(settings)
 {
     _app = app;
 }
Пример #4
0
 public AppCall(ASMRestSettings settings) : base(settings)
 {
 }
Пример #5
0
 public IssueAttributeDefinitionListCall(ASMRestSettings settings) : base(settings)
 {
 }
Пример #6
0
 public ApplicationListCall(ASMRestSettings settings) : base(settings)
 {
 }
Пример #7
0
        public OpenIssueTypeListCall(string appName, ASMRestSettings settings, Severity severity = Severity.All, GroupType groupType = GroupType.IssueType, IssueItemType itemType = IssueItemType.Unspecified)
            : base(settings)
        {
            _appName = Utils.HtmlDecode(appName);
            if ((severity & Severity.High) == Severity.High)
            {
                _severityQuery = "Severity=Critical,Severity=High";
            }
            if ((severity & Severity.Medium) == Severity.Medium)
            {
                _severityQuery += ",Severity=Medium";
            }
            if ((severity & Severity.Low) == Severity.Low)
            {
                _severityQuery += ",Severity=Low";
            }

            if ((severity & Severity.Information) == Severity.Information)
            {
                _severityQuery += ",Severity=Information";
            }

            if ((severity & Severity.Undetermined) == Severity.Undetermined)
            {
                _severityQuery += ",Severity=Undetermined";
            }
            _severityQuery = _severityQuery.Trim(',');

            _groupType = groupType == GroupType.IssueType ? "issueType" : "severity";

            _itemType = "";
            if ((itemType & IssueItemType.Child) == IssueItemType.Child)
            {
                _itemType += "Item Type=Child,";
            }
            if ((itemType & IssueItemType.Countermeasure) == IssueItemType.Countermeasure)
            {
                _itemType += "Item Type=Countermeasure,Countermeasure Level=Absent,Countermeasure Level=Sporadic,Countermeasure Level=Defective,";
            }
            if ((itemType & IssueItemType.HighestThreat) == IssueItemType.HighestThreat)
            {
                _itemType += "Item Type=Highest Threat,";
            }
            if ((itemType & IssueItemType.Group) == IssueItemType.Group)
            {
                _itemType += "Item Type=Group,";
            }
            if ((itemType & IssueItemType.Unspecified) == IssueItemType.Unspecified)
            {
                _itemType += "Item Type=Unspecified,";
            }
            if ((itemType & IssueItemType.Vulnerability) == IssueItemType.Vulnerability)
            {
                _itemType += "Item Type=Vulnerability,";
            }

            if (this.ASMRestSettings.ServerVersion.CompareTo(new Version("9.0.2.0")) >= 0)
            {
                _issueQuery += "Status=New,";
            }
        }
Пример #8
0
 public BaseRestHttpClient(ASMRestSettings settings)
 {
     _asmRestSettings = settings;
 }
Пример #9
0
 public BaseRestCall(ASMRestSettings settings) : base(settings)
 {
 }