GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (4873)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

plugins/cardwall/tests/RendererBoardBuilder.php (2 issues)

Labels
Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/**
4
 * Copyright (c) Enalean, 2012. All Rights Reserved.
5
 *
6
 * This file is a part of Tuleap.
7
 *
8
 * Tuleap is free software; you can redistribute it and/or modify
9
 * it under the terms of the GNU General Public License as published by
10
 * the Free Software Foundation; either version 2 of the License, or
11
 * (at your option) any later version.
12
 *
13
 * Tuleap is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with Tuleap. If not, see <http://www.gnu.org/licenses/>.
20
 */
21
22
require_once dirname(__FILE__) .'/bootstrap.php';
23
require_once 'common/TreeNode/TreeNodeMapper.class.php';
24
25
class Cardwall_ArtifactNodeTreeProvider4Tests extends Cardwall_RendererBoardBuilder {
26
    public function getCards(array $artifact_ids, $swimline_id) {
27
        return parent::getCards($artifact_ids, $swimline_id);
0 ignored issues
show
The method getCards() does not exist on Cardwall_RendererBoardBuilder. Did you maybe mean getCardsPresenters()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
28
    }
29
30
    public function wrapInAThreeLevelArtifactTree(array $cards, $swimline_id) {
31
        return parent::wrapInAThreeLevelArtifactTree($cards, $swimline_id);
32
    }
33
}
34
35
class Cardwall_ArtifactNodeTreeProviderTest extends TuleapTestCase {
36
37
    public function setUp() {
38
        parent::setUp();
39
        $this->node_factory     = mock('Cardwall_CardInCellPresenterNodeFactory');
40
        $this->artifact_factory = mock('Tracker_ArtifactFactory');
41
        $this->provider = new Cardwall_ArtifactNodeTreeProvider4Tests($this->node_factory, $this->artifact_factory);
0 ignored issues
show
The call to Cardwall_ArtifactNodeTre...er4Tests::__construct() misses a required argument $swimline_factory.

This check looks for function calls that miss required arguments.

Loading history...
42
    }
43
44
    public function itCreatesTwoLevelsEvenIfNoArtifactIdsAreGiven() {
45
        $root_node = $this->provider->wrapInAThreeLevelArtifactTree(array(), 'whatever');
46
47
        $this->assertTrue($root_node->hasChildren());
48
        $this->assertFalse($root_node->getChild(0)->hasChildren());
49
    }
50
51
    public function itHasASwimlineId() {
52
        $root_node = $this->provider->wrapInAThreeLevelArtifactTree(array(), 'Dat Id');
53
54
        $this->assertEqual($root_node->getChild(0)->getId(), 'Dat Id');
55
    }
56
57
    public function itCreatesAThreeLevelTreeBecauseItMustLookLikeTheNodeTreeFromAMilestone() {
58
        $artifact4 = aMockArtifact()->withId(4)->build();
59
60
        $root_node = $this->provider->wrapInAThreeLevelArtifactTree(array(new ArtifactNode($artifact4)), 'whatever');
61
62
        $this->assertTrue($root_node->hasChildren());
63
        $this->assertTrue($root_node->getChild(0)->hasChildren());
64
        $cards = $root_node->getChild(0)->getChildren();
65
66
        $this->assertEqual(1, count($cards));
67
        $card = $cards[0];
68
        $id   = $card->getId();
69
        $this->assertEqual($id, 4);
70
        $artifact = $card->getArtifact();
71
        $this->assertIdentical($artifact, $artifact4);
72
73
    }
74
75
    public function itCreatesAnArtifactNodeForEveryArtifactId() {
76
        $swmiline_id = 7;
77
78
        $artifact4 = aMockArtifact()->withId(4)->build();
79
        $artifact5 = aMockArtifact()->withId(5)->build();
80
        $artifact6 = aMockArtifact()->withId(6)->build();
81
82
        $node4 = new Cardwall_CardInCellPresenterNode(new Cardwall_CardInCellPresenter(new Cardwall_CardPresenter($artifact4, mock('Cardwall_CardFields'), '*', mock('Cardwall_UserPreferences_UserPreferencesDisplayUser'), 0, array()), 4));
83
        $node5 = new Cardwall_CardInCellPresenterNode(new Cardwall_CardInCellPresenter(new Cardwall_CardPresenter($artifact5, mock('Cardwall_CardFields'), '*', mock('Cardwall_UserPreferences_UserPreferencesDisplayUser'), 0, array()), 5));
84
        $node6 = new Cardwall_CardInCellPresenterNode(new Cardwall_CardInCellPresenter(new Cardwall_CardPresenter($artifact6, mock('Cardwall_CardFields'), '*', mock('Cardwall_UserPreferences_UserPreferencesDisplayUser'), 0, array()), 6));
85
86
        stub($this->artifact_factory)->getArtifactById(4)->returns($artifact4);
87
        stub($this->artifact_factory)->getArtifactById(5)->returns($artifact5);
88
        stub($this->artifact_factory)->getArtifactById(6)->returns($artifact6);
89
90
        stub($this->node_factory)->getCardInCellPresenterNode($artifact4, $swmiline_id)->returns($node4);
91
        stub($this->node_factory)->getCardInCellPresenterNode($artifact5, $swmiline_id)->returns($node5);
92
        stub($this->node_factory)->getCardInCellPresenterNode($artifact6, $swmiline_id)->returns($node6);
93
94
        $cards = $this->provider->getCards(array(4, 5, 6), $swmiline_id);
95
96
        $this->assertEqual(3, count($cards));
97
        foreach ($cards as $card) {
98
            $id = $card->getId();
99
            $this->assertBetweenClosedInterval($id, 4, 6);
100
            $artifact = $card->getArtifact();
101
            $this->assertBetweenClosedInterval($artifact->getId(), 4, 6);
102
            $this->assertIsA($artifact, 'Tracker_Artifact');
103
        }
104
105
    }
106
107
}
108
?>
109